Tri des utilisateurs par nom, prénom. Possibilité de saisir/modifier le commentaire de la commande.prodstable
$array_options[$c->id]['str_montant'] = number_format($c->montant, 2, ',', '').' €' ; | $array_options[$c->id]['str_montant'] = number_format($c->montant, 2, ',', '').' €' ; | ||||
$array_options[$c->id]['montant_paye'] = $c->montant_paye ; | $array_options[$c->id]['montant_paye'] = $c->montant_paye ; | ||||
$array_options[$c->id]['produits'] = [] ; | $array_options[$c->id]['produits'] = [] ; | ||||
$array_options[$c->id]['commentaire'] = Html::encode($c->commentaire) ; | |||||
foreach($c->commandeProduits as $cp) | foreach($c->commandeProduits as $cp) | ||||
{ | { | ||||
$array_options[$c->id]['produits'][$cp->id_produit] = $cp->quantite ; | $array_options[$c->id]['produits'][$cp->id_produit] = $cp->quantite ; | ||||
$arr_jour_semaine = [0 => 'dimanche', 1 => 'lundi', 2 => 'mardi', 3 => 'mercredi', 4 => 'jeudi', 5 => 'vendredi', 6 => 'samedi']; | $arr_jour_semaine = [0 => 'dimanche', 1 => 'lundi', 2 => 'mardi', 3 => 'mercredi', 4 => 'jeudi', 5 => 'vendredi', 6 => 'samedi']; | ||||
$champs_horaires_point_vente = 'horaires_' . $arr_jour_semaine[$num_jour_semaine]; | $champs_horaires_point_vente = 'horaires_' . $arr_jour_semaine[$num_jour_semaine]; | ||||
// header | |||||
/* $line = [''] ; | |||||
foreach($produits as $p) { | |||||
if(isset($produits_selec[$p->id]['actif']) && $produits_selec[$p->id]['actif']) { | |||||
$line[] = $p->getLibelleAdmin() ; | |||||
} | |||||
} | |||||
$data[] = $line ; */ | |||||
// par point de vente | // par point de vente | ||||
foreach ($points_vente as $pv) { | foreach ($points_vente as $pv) { | ||||
if (count($pv->commandes) && strlen($pv->$champs_horaires_point_vente)) { | if (count($pv->commandes) && strlen($pv->$champs_horaires_point_vente)) { | ||||
//$data[] = [$pv->nom] ; | |||||
$line = [$pv->nom, 'Produits', 'Montant', 'Commentaire']; | $line = [$pv->nom, 'Produits', 'Montant', 'Commentaire']; | ||||
/* foreach($produits as $p) { | |||||
if(isset($produits_selec[$p->id]['actif']) && $produits_selec[$p->id]['actif']) { | |||||
$line[] = $p->getLibelleAdmin() ; | |||||
} | |||||
} */ | |||||
$data[] = $line; | $data[] = $line; | ||||
$res = $this->contentPointVenteCSV($date, $produits, $points_vente, $pv->id); | $res = $this->contentPointVenteCSV($date, $produits, $points_vente, $pv->id); | ||||
$infos = $this->actionIndex($date, true); | $infos = $this->actionIndex($date, true); | ||||
// $data[] = [] ; | |||||
/* $data[] = [ | |||||
'CA potentiel boutique', | |||||
number_format($infos['ca_potentiel'] - $infos['recettes_pain_livre'], 2).' €', | |||||
] ; */ | |||||
/* $res = $this->contentRecapCSV($date, $produits, $points_vente, $commandes) ; | |||||
$data[] = ['Récapitulatif global'] ; | |||||
foreach($res['data'] as $line) { | |||||
$data[] = $line ; | |||||
} */ | |||||
CSV::downloadSendHeaders($filename . '.csv'); | CSV::downloadSendHeaders($filename . '.csv'); | ||||
echo CSV::array2csv($data); | echo CSV::array2csv($data); | ||||
die(); | die(); | ||||
$this->redirect(['index', 'date' => $date]); | $this->redirect(['index', 'date' => $date]); | ||||
} | } | ||||
public function actionAjaxUpdate($id_commande, $produits, $date) | |||||
public function actionAjaxUpdate($id_commande, $produits, $date, $commentaire) | |||||
{ | { | ||||
$commande = Commande::find()->with('production','creditHistorique','user')->where(['id' => $id_commande])->one() ; | $commande = Commande::find()->with('production','creditHistorique','user')->where(['id' => $id_commande])->one() ; | ||||
} | } | ||||
$commande->date_update = date('Y-m-d H:i:s') ; | $commande->date_update = date('Y-m-d H:i:s') ; | ||||
$commande->commentaire = $commentaire ; | |||||
$commande->save() ; | $commande->save() ; | ||||
// data commande | // data commande | ||||
die() ; | die() ; | ||||
} | } | ||||
public function actionAjaxCreate($date, $id_pv, $id_user, $username, $produits) | |||||
public function actionAjaxCreate($date, $id_pv, $id_user, $username, $produits, $commentaire) | |||||
{ | { | ||||
$produits = json_decode($produits) ; | $produits = json_decode($produits) ; | ||||
$point_vente = PointVente::findOne($id_pv) ; | $point_vente = PointVente::findOne($id_pv) ; | ||||
$commande->id_point_vente = $id_pv ; | $commande->id_point_vente = $id_pv ; | ||||
$commande->id_production = $production->id ; | $commande->id_production = $production->id ; | ||||
$commande->type = Commande::TYPE_ADMIN ; | $commande->type = Commande::TYPE_ADMIN ; | ||||
$commande->commentaire = $commentaire ; | |||||
if($id_user) | if($id_user) | ||||
{ | { | ||||
} | } | ||||
$json_commande = json_encode(['montant' => number_format($commande->montant, 2), 'produits' => $produits]) ; | $json_commande = json_encode(['montant' => number_format($commande->montant, 2), 'produits' => $produits]) ; | ||||
$json_commande = $commande->getDataJson() ; | |||||
$str_user = '' ; | $str_user = '' ; | ||||
if($commande->user) | if($commande->user) | ||||
$str_user = $commande->user->nom.' '.$commande->user->prenom ; | $str_user = $commande->user->nom.' '.$commande->user->prenom ; | ||||
$str_commentaire = '' ; | $str_commentaire = '' ; | ||||
if(strlen($commande->commentaire)) | if(strlen($commande->commentaire)) | ||||
{ | { | ||||
$str_commentaire = '<span class="glyphicon glyphicon-comment">'.Html::encode($commande->commentaire).'</span>' ; | |||||
$str_commentaire = ' <span class="glyphicon glyphicon-comment"></span>' ; | |||||
} | } | ||||
$str_label_type_commande = ''; | $str_label_type_commande = ''; | ||||
. 'data-commande=\''.$json_commande.'\' ' | . 'data-commande=\''.$json_commande.'\' ' | ||||
. 'data-date="'.date('d/m H:i', strtotime($commande->date)).'">' | . 'data-date="'.date('d/m H:i', strtotime($commande->date)).'">' | ||||
. '<span class="montant">'.number_format($commande->montant, 2).' €</span>' | . '<span class="montant">'.number_format($commande->montant, 2).' €</span>' | ||||
. '<span class="user">'.$str_user.$str_label_type_commande.'</span>' | |||||
. '<span class="user">'.$str_label_type_commande.' '.$str_user.'</span>' | |||||
. $str_commentaire | . $str_commentaire | ||||
. '</a></li>', | . '</a></li>', | ||||
]) ; | ]) ; |
<?php endif; ?> | <?php endif; ?> | ||||
</div> | </div> | ||||
<ul class="liste-commandes btn-group-vertical"> | |||||
<ul class="liste-commandes btn-group-vertical<?php if(!count($pv->commandes)): ?> no-commande<?php endif; ?>"> | |||||
<?php foreach($pv->commandes as $c): ?> | <?php foreach($pv->commandes as $c): ?> | ||||
<li> | <li> | ||||
<a href="javascript:void(0);" class="btn btn-default" data-pv-id="<?= $pv->id ?>" data-id-commande="<?= $c->id ?>" data-commande='<?= $pv->data_options_commandes[$c->id]['data-commande'] ?>' data-commentaire="<?= Html::encode($c->commentaire) ?>" data-date="<?= date('d/m à H:i',strtotime($c->date)); ?>"> | <a href="javascript:void(0);" class="btn btn-default" data-pv-id="<?= $pv->id ?>" data-id-commande="<?= $c->id ?>" data-commande='<?= $pv->data_options_commandes[$c->id]['data-commande'] ?>' data-commentaire="<?= Html::encode($c->commentaire) ?>" data-date="<?= date('d/m à H:i',strtotime($c->date)); ?>"> | ||||
<?php if($c->montant_paye - $c->montant > 0.01): ?><span class="glyphicon glyphicon-warning-sign"></span><?php endif; ?> | <?php if($c->montant_paye - $c->montant > 0.01): ?><span class="glyphicon glyphicon-warning-sign"></span><?php endif; ?> | ||||
</span> | </span> | ||||
<span class="user"> | <span class="user"> | ||||
<?php if(isset($c->user)): ?> | |||||
<?= Html::encode($c->user->nom.' '.$c->user->prenom); ?> | |||||
<?php else: ?> | |||||
<?= Html::encode($c->username); ?> | |||||
<?php endif; ?> | |||||
<?php if($c->type): ?> | <?php if($c->type): ?> | ||||
<?php if($c->type == Commande::TYPE_ADMIN): ?> | <?php if($c->type == Commande::TYPE_ADMIN): ?> | ||||
<span class="label label-warning">vous</span> | <span class="label label-warning">vous</span> | ||||
<span class="label label-success">client</span> | <span class="label label-success">client</span> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<?php endif; ?> | <?php endif; ?> | ||||
<?php if(isset($c->user)): ?> | |||||
<?= Html::encode($c->user->nom.' '.$c->user->prenom); ?> | |||||
<?php else: ?> | |||||
<?= Html::encode($c->username); ?> | |||||
<?php endif; ?> | |||||
</span> | </span> | ||||
<?php if (strlen($c->commentaire)): ?> | <?php if (strlen($c->commentaire)): ?> | ||||
<span class="glyphicon glyphicon-comment"></span> | <span class="glyphicon glyphicon-comment"></span> | ||||
</span> | </span> | ||||
<span class="the-title"></span> | <span class="the-title"></span> | ||||
<span class="choix-user"> | <span class="choix-user"> | ||||
<?= Html::activeDropDownList(new User, 'id', ArrayHelper::map(User::find()->joinWith('userEtablissement')->where('user_etablissement.id_etablissement = '.Yii::$app->user->identity->id_etablissement)->andWhere('user_etablissement.actif = 1')->all(), 'id', function($model, $defaultValue) { | |||||
<?= Html::activeDropDownList(new User, 'id', ArrayHelper::map(User::find()->joinWith('userEtablissement')->where('user_etablissement.id_etablissement = '.Yii::$app->user->identity->id_etablissement)->andWhere('user_etablissement.actif = 1')->orderBy('user.nom ASC, user.prenom ASC')->all(), 'id', function($model, $defaultValue) { | |||||
return $model['nom'].' '.$model['prenom']; | return $model['nom'].' '.$model['prenom']; | ||||
}), ['prompt' => '--','class' => 'form-control user-id']) ?> | }), ['prompt' => '--','class' => 'form-control user-id']) ?> | ||||
OU <input type="text" class="form-control username" placeholder="Choisissez un nom" /> | OU <input type="text" class="form-control username" placeholder="Choisissez un nom" /> | ||||
</h2> | </h2> | ||||
<div class="commentaire alert alert-info"> | <div class="commentaire alert alert-info"> | ||||
</div> | </div> | ||||
<textarea name="commentaire" class="form-control textarea-commentaire" placeholder="Commentaire"></textarea> | |||||
<table class="table table-bordered table-condensed tab-content table-produits"> | <table class="table table-bordered table-condensed tab-content table-produits"> | ||||
<tbody> | <tbody> | ||||
<?php foreach ($produits as $p): ?> | <?php foreach ($produits as $p): ?> |
overflow-y: scroll; | overflow-y: scroll; | ||||
} | } | ||||
/* line 452, ../sass/screen.scss */ | /* line 452, ../sass/screen.scss */ | ||||
#page-commande #commandes-points-vente ul.liste-commandes.no-commande { | |||||
display: none; | |||||
} | |||||
/* line 456, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente ul.liste-commandes li { | #page-commande #commandes-points-vente ul.liste-commandes li { | ||||
padding: 0; | padding: 0; | ||||
margin: 0; | margin: 0; | ||||
} | } | ||||
/* line 455, ../sass/screen.scss */ | |||||
/* line 459, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente ul.liste-commandes li a { | #page-commande #commandes-points-vente ul.liste-commandes li a { | ||||
text-align: left; | text-align: left; | ||||
-moz-border-radius: 0px; | -moz-border-radius: 0px; | ||||
padding: 7px; | padding: 7px; | ||||
color: #333; | color: #333; | ||||
} | } | ||||
/* line 463, ../sass/screen.scss */ | |||||
/* line 467, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente ul.liste-commandes li a .montant { | #page-commande #commandes-points-vente ul.liste-commandes li a .montant { | ||||
float: right; | float: right; | ||||
color: #BB8757; | color: #BB8757; | ||||
font-weight: bold; | font-weight: bold; | ||||
} | } | ||||
/* line 468, ../sass/screen.scss */ | |||||
/* line 472, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente ul.liste-commandes li a .montant.paye { | #page-commande #commandes-points-vente ul.liste-commandes li a .montant.paye { | ||||
color: #5cb85c; | color: #5cb85c; | ||||
color: #519951; | color: #519951; | ||||
} | } | ||||
/* line 474, ../sass/screen.scss */ | |||||
/* line 478, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente ul.liste-commandes li a .glyphicon-comment { | #page-commande #commandes-points-vente ul.liste-commandes li a .glyphicon-comment { | ||||
color: #BB8757; | color: #BB8757; | ||||
} | } | ||||
/* line 478, ../sass/screen.scss */ | |||||
/* line 482, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente ul.liste-commandes li a:hover, #page-commande #commandes-points-vente ul.liste-commandes li a:active, #page-commande #commandes-points-vente ul.liste-commandes li a.active { | #page-commande #commandes-points-vente ul.liste-commandes li a:hover, #page-commande #commandes-points-vente ul.liste-commandes li a:active, #page-commande #commandes-points-vente ul.liste-commandes li a.active { | ||||
text-decoration: none; | text-decoration: none; | ||||
background-color: #FCF8E3; | background-color: #FCF8E3; | ||||
-webkit-transition: all 0.1s; | -webkit-transition: all 0.1s; | ||||
transition: all 0.1s; | transition: all 0.1s; | ||||
} | } | ||||
/* line 492, ../sass/screen.scss */ | |||||
/* line 496, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .creer-commande, | #page-commande #commandes-points-vente .creer-commande, | ||||
#page-commande #commandes-points-vente .commandes-auto { | #page-commande #commandes-points-vente .commandes-auto { | ||||
width: 100%; | width: 100%; | ||||
margin-bottom: 10px; | margin-bottom: 10px; | ||||
} | } | ||||
/* line 498, ../sass/screen.scss */ | |||||
/* line 502, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .bloc-commande { | #page-commande #commandes-points-vente .bloc-commande { | ||||
padding-top: 20px; | padding-top: 20px; | ||||
margin-top: 20px; | margin-top: 20px; | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 504, ../sass/screen.scss */ | |||||
/* line 508, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .title-user { | #page-commande #commandes-points-vente .title-user { | ||||
display: none; | display: none; | ||||
font-size: 19px; | font-size: 19px; | ||||
margin-top: 0px; | margin-top: 0px; | ||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |||||
} | } | ||||
/* line 509, ../sass/screen.scss */ | |||||
/* line 514, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-remove, | #page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-remove, | ||||
#page-commande #commandes-points-vente .title-user .btn-cancel, #page-commande #commandes-points-vente .title-user .btn-save { | #page-commande #commandes-points-vente .title-user .btn-cancel, #page-commande #commandes-points-vente .title-user .btn-save { | ||||
float: right; | float: right; | ||||
position: relative; | position: relative; | ||||
top: -6px; | top: -6px; | ||||
} | } | ||||
/* line 516, ../sass/screen.scss */ | |||||
/* line 521, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-cancel { | #page-commande #commandes-points-vente .title-user .btn-edit, #page-commande #commandes-points-vente .title-user .btn-cancel { | ||||
margin-right: 10px; | margin-right: 10px; | ||||
} | } | ||||
/* line 520, ../sass/screen.scss */ | |||||
/* line 525, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .title-user .buttons-save-cancel { | #page-commande #commandes-points-vente .title-user .buttons-save-cancel { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 524, ../sass/screen.scss */ | |||||
/* line 529, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .title-user .choix-user { | #page-commande #commandes-points-vente .title-user .choix-user { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 527, ../sass/screen.scss */ | |||||
/* line 532, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .title-user .choix-user .form-control { | #page-commande #commandes-points-vente .title-user .choix-user .form-control { | ||||
width: 200px; | width: 200px; | ||||
display: inline; | display: inline; | ||||
} | } | ||||
/* line 535, ../sass/screen.scss */ | |||||
/* line 540, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente table.table-produits .td-commande { | #page-commande #commandes-points-vente table.table-produits .td-commande { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 538, ../sass/screen.scss */ | |||||
/* line 543, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente table.table-produits input.form-control { | #page-commande #commandes-points-vente table.table-produits input.form-control { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 544, ../sass/screen.scss */ | |||||
/* line 549, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .td-produit, | #page-commande #commandes-points-vente .td-produit, | ||||
#page-commande #commandes-points-vente .th-produit { | #page-commande #commandes-points-vente .th-produit { | ||||
width: 70%; | width: 70%; | ||||
} | } | ||||
/* line 549, ../sass/screen.scss */ | |||||
/* line 554, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .td-commande, | #page-commande #commandes-points-vente .td-commande, | ||||
#page-commande #commandes-points-vente .th-commande { | #page-commande #commandes-points-vente .th-commande { | ||||
width: 30%; | width: 30%; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 555, ../sass/screen.scss */ | |||||
/* line 560, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .td-produit { | #page-commande #commandes-points-vente .td-produit { | ||||
text-transform: uppercase; | text-transform: uppercase; | ||||
} | } | ||||
/* line 559, ../sass/screen.scss */ | |||||
/* line 564, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .td-commande { | #page-commande #commandes-points-vente .td-commande { | ||||
font-weight: bold; | font-weight: bold; | ||||
} | } | ||||
/* line 563, ../sass/screen.scss */ | |||||
/* line 568, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .td-total { | #page-commande #commandes-points-vente .td-total { | ||||
font-size: 18px; | font-size: 18px; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 567, ../sass/screen.scss */ | |||||
/* line 572, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .td-total span { | #page-commande #commandes-points-vente .td-total span { | ||||
padding: 2px 10px; | padding: 2px 10px; | ||||
background-color: #BB8757; | background-color: #BB8757; | ||||
-webkit-border-radius: 8px; | -webkit-border-radius: 8px; | ||||
border-radius: 8px; | border-radius: 8px; | ||||
} | } | ||||
/* line 577, ../sass/screen.scss */ | |||||
/* line 582, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .td-paiement .buttons-credit { | #page-commande #commandes-points-vente .td-paiement .buttons-credit { | ||||
float: right; | float: right; | ||||
} | } | ||||
/* line 583, ../sass/screen.scss */ | |||||
/* line 588, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_user, | #page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_user, | ||||
#page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_etablissement { | #page-commande #commandes-points-vente .panel-commande-automatique .field-commandeautoform-id_etablissement { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 590, ../sass/screen.scss */ | |||||
/* line 595, ../sass/screen.scss */ | |||||
#page-commande #commandes-points-vente .panel-commande-automatique .jours .form-group { | #page-commande #commandes-points-vente .panel-commande-automatique .jours .form-group { | ||||
float: left; | float: left; | ||||
margin-right: 10px; | margin-right: 10px; | ||||
} | } | ||||
/* line 599, ../sass/screen.scss */ | |||||
/* line 604, ../sass/screen.scss */ | |||||
#page-commande #old-commandes { | #page-commande #old-commandes { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 603, ../sass/screen.scss */ | |||||
/* line 608, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente { | #page-commande .form-commandes-point-vente { | ||||
margin-top: 20px; | margin-top: 20px; | ||||
} | } | ||||
/* line 607, ../sass/screen.scss */ | |||||
/* line 612, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente table { | #page-commande .form-commandes-point-vente table { | ||||
border-bottom: solid 1px #e0e0e0; | border-bottom: solid 1px #e0e0e0; | ||||
} | } | ||||
/* line 611, ../sass/screen.scss */ | |||||
/* line 616, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .title-point-vente { | #page-commande .form-commandes-point-vente .title-point-vente { | ||||
background-color: #fff8e2; | background-color: #fff8e2; | ||||
border-left: solid 3px #BB8757; | border-left: solid 3px #BB8757; | ||||
text-align: left; | text-align: left; | ||||
padding: 10px; | padding: 10px; | ||||
} | } | ||||
/* line 619, ../sass/screen.scss */ | |||||
/* line 624, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .title-totaux { | #page-commande .form-commandes-point-vente .title-totaux { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 623, ../sass/screen.scss */ | |||||
/* line 628, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .border-left { | #page-commande .form-commandes-point-vente .border-left { | ||||
border-left: solid 1px #e0e0e0; | border-left: solid 1px #e0e0e0; | ||||
} | } | ||||
/* line 627, ../sass/screen.scss */ | |||||
/* line 632, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .border-right { | #page-commande .form-commandes-point-vente .border-right { | ||||
border-right: solid 1px #e0e0e0; | border-right: solid 1px #e0e0e0; | ||||
} | } | ||||
/* line 631, ../sass/screen.scss */ | |||||
/* line 636, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente input.quantite { | #page-commande .form-commandes-point-vente input.quantite { | ||||
width: 30px; | width: 30px; | ||||
background-color: white; | background-color: white; | ||||
border: solid 1px #e0e0e0; | border: solid 1px #e0e0e0; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 639, ../sass/screen.scss */ | |||||
/* line 644, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .td-produit { | #page-commande .form-commandes-point-vente .td-produit { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 643, ../sass/screen.scss */ | |||||
/* line 648, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .submit-pv { | #page-commande .form-commandes-point-vente .submit-pv { | ||||
float: right; | float: right; | ||||
} | } | ||||
/* line 647, ../sass/screen.scss */ | |||||
/* line 652, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .select-user { | #page-commande .form-commandes-point-vente .select-user { | ||||
background-color: #F9F9F9; | background-color: #F9F9F9; | ||||
border: solid 1px #e0e0e0; | border: solid 1px #e0e0e0; | ||||
} | } | ||||
/* line 652, ../sass/screen.scss */ | |||||
/* line 657, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .date-commande { | #page-commande .form-commandes-point-vente .date-commande { | ||||
font-size: 12px; | font-size: 12px; | ||||
} | } | ||||
/* line 656, ../sass/screen.scss */ | |||||
/* line 661, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .datepicker, #page-commande .form-commandes-point-vente .text { | #page-commande .form-commandes-point-vente .datepicker, #page-commande .form-commandes-point-vente .text { | ||||
background-color: white; | background-color: white; | ||||
border: solid 1px #e0e0e0; | border: solid 1px #e0e0e0; | ||||
margin-top: 3px; | margin-top: 3px; | ||||
width: 100px; | width: 100px; | ||||
} | } | ||||
/* line 664, ../sass/screen.scss */ | |||||
/* line 669, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente td.center { | #page-commande .form-commandes-point-vente td.center { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 670, ../sass/screen.scss */ | |||||
/* line 675, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .depasse { | #page-commande .form-commandes-point-vente .depasse { | ||||
color: #b32815; | color: #b32815; | ||||
} | } | ||||
/* line 674, ../sass/screen.scss */ | |||||
/* line 679, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .total strong span { | #page-commande .form-commandes-point-vente .total strong span { | ||||
font-weight: normal; | font-weight: normal; | ||||
font-size: 13px; | font-size: 13px; | ||||
} | } | ||||
/* line 679, ../sass/screen.scss */ | |||||
/* line 684, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente .vrac { | #page-commande .form-commandes-point-vente .vrac { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 683, ../sass/screen.scss */ | |||||
/* line 688, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente td.client { | #page-commande .form-commandes-point-vente td.client { | ||||
text-align: left; | text-align: left; | ||||
padding: 3px; | padding: 3px; | ||||
} | } | ||||
/* line 686, ../sass/screen.scss */ | |||||
/* line 691, ../sass/screen.scss */ | |||||
#page-commande .form-commandes-point-vente td.client .date-commande { | #page-commande .form-commandes-point-vente td.client .date-commande { | ||||
color: gray; | color: gray; | ||||
} | } | ||||
/* line 693, ../sass/screen.scss */ | |||||
/* line 698, ../sass/screen.scss */ | |||||
#page-commande .table-header-rotated { | #page-commande .table-header-rotated { | ||||
border-top: 0px; | border-top: 0px; | ||||
border-left: 0px; | border-left: 0px; | ||||
width: 100%; | width: 100%; | ||||
width: auto; | width: auto; | ||||
} | } | ||||
/* line 700, ../sass/screen.scss */ | |||||
/* line 705, ../sass/screen.scss */ | |||||
#page-commande .table-header-rotated .total strong { | #page-commande .table-header-rotated .total strong { | ||||
border-bottom: solid 1px gray; | border-bottom: solid 1px gray; | ||||
} | } | ||||
/* line 705, ../sass/screen.scss */ | |||||
/* line 710, ../sass/screen.scss */ | |||||
#page-commande .table-header-rotated th.row-header { | #page-commande .table-header-rotated th.row-header { | ||||
width: auto; | width: auto; | ||||
} | } | ||||
/* line 709, ../sass/screen.scss */ | |||||
/* line 714, ../sass/screen.scss */ | |||||
#page-commande .table-header-rotated td { | #page-commande .table-header-rotated td { | ||||
width: 40px; | width: 40px; | ||||
border-top: 1px solid #dddddd; | border-top: 1px solid #dddddd; | ||||
vertical-align: middle; | vertical-align: middle; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 718, ../sass/screen.scss */ | |||||
/* line 723, ../sass/screen.scss */ | |||||
#page-commande .table-header-rotated th.rotate-45 { | #page-commande .table-header-rotated th.rotate-45 { | ||||
font-weight: normal; | font-weight: normal; | ||||
height: 80px; | height: 80px; | ||||
line-height: 1; | line-height: 1; | ||||
border: 0px none; | border: 0px none; | ||||
} | } | ||||
/* line 732, ../sass/screen.scss */ | |||||
/* line 737, ../sass/screen.scss */ | |||||
#page-commande .table-header-rotated th.rotate-45 > div { | #page-commande .table-header-rotated th.rotate-45 > div { | ||||
background-color: #F5F5F5; | background-color: #F5F5F5; | ||||
position: relative; | position: relative; | ||||
border-right: 1px solid #dddddd; | border-right: 1px solid #dddddd; | ||||
border-top: 1px solid #dddddd; | border-top: 1px solid #dddddd; | ||||
} | } | ||||
/* line 749, ../sass/screen.scss */ | |||||
/* line 754, ../sass/screen.scss */ | |||||
#page-commande .table-header-rotated th.rotate-45 span { | #page-commande .table-header-rotated th.rotate-45 span { | ||||
-ms-transform: skew(45deg, 0deg) rotate(315deg); | -ms-transform: skew(45deg, 0deg) rotate(315deg); | ||||
-moz-transform: skew(45deg, 0deg) rotate(315deg); | -moz-transform: skew(45deg, 0deg) rotate(315deg); | ||||
text-align: left; | text-align: left; | ||||
} | } | ||||
/* line 770, ../sass/screen.scss */ | |||||
/* line 775, ../sass/screen.scss */ | |||||
#email-masse-form #ids-users { | #email-masse-form #ids-users { | ||||
line-height: 30px; | line-height: 30px; | ||||
} | } | ||||
/* line 772, ../sass/screen.scss */ | |||||
/* line 777, ../sass/screen.scss */ | |||||
#email-masse-form #ids-users .label { | #email-masse-form #ids-users .label { | ||||
text-transform: capitalize; | text-transform: capitalize; | ||||
} | } | ||||
/* line 780, ../sass/screen.scss */ | |||||
/* line 785, ../sass/screen.scss */ | |||||
.produit-create #jours-production .form-group, .produit-update #jours-production .form-group { | .produit-create #jours-production .form-group, .produit-update #jours-production .form-group { | ||||
float: left; | float: left; | ||||
margin-right: 15px; | margin-right: 15px; | ||||
} | } | ||||
/* line 784, ../sass/screen.scss */ | |||||
/* line 789, ../sass/screen.scss */ | |||||
.produit-create #jours-production .form-group label, .produit-update #jours-production .form-group label { | .produit-create #jours-production .form-group label, .produit-update #jours-production .form-group label { | ||||
font-weight: normal; | font-weight: normal; | ||||
} | } | ||||
/* line 789, ../sass/screen.scss */ | |||||
/* line 794, ../sass/screen.scss */ | |||||
.produit-create .field-produit-id_etablissement, .produit-update .field-produit-id_etablissement { | .produit-create .field-produit-id_etablissement, .produit-update .field-produit-id_etablissement { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 794, ../sass/screen.scss */ | |||||
/* line 799, ../sass/screen.scss */ | |||||
.table-striped > tbody > tr:nth-of-type(2n) { | .table-striped > tbody > tr:nth-of-type(2n) { | ||||
background-color: white; | background-color: white; | ||||
} | } | ||||
/* line 799, ../sass/screen.scss */ | |||||
/* line 804, ../sass/screen.scss */ | |||||
.wrap .produit-index .td-photo { | .wrap .produit-index .td-photo { | ||||
max-width: 100px; | max-width: 100px; | ||||
width: 100px; | width: 100px; | ||||
} | } | ||||
/* line 803, ../sass/screen.scss */ | |||||
/* line 808, ../sass/screen.scss */ | |||||
.wrap .produit-index .photo-produit { | .wrap .produit-index .photo-produit { | ||||
max-width: 100px; | max-width: 100px; | ||||
} | } | ||||
/* line 807, ../sass/screen.scss */ | |||||
/* line 812, ../sass/screen.scss */ | |||||
.wrap .produit-index .ui-state-highlight { | .wrap .produit-index .ui-state-highlight { | ||||
height: 75px; | height: 75px; | ||||
background-color: #F8F1DD; | background-color: #F8F1DD; | ||||
} | } | ||||
/* communiquer */ | /* communiquer */ | ||||
/* line 815, ../sass/screen.scss */ | |||||
/* line 820, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi { | .communiquer-mode-emploi { | ||||
border: solid 1px #e0e0e0; | border: solid 1px #e0e0e0; | ||||
padding: 10px; | padding: 10px; | ||||
margin-bottom: 30px; | margin-bottom: 30px; | ||||
font-family: "myriadpro-regular"; | font-family: "myriadpro-regular"; | ||||
} | } | ||||
/* line 823, ../sass/screen.scss */ | |||||
/* line 828, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi .header .logo { | .communiquer-mode-emploi .header .logo { | ||||
float: left; | float: left; | ||||
width: 75px; | width: 75px; | ||||
padding-right: 20px; | padding-right: 20px; | ||||
padding-top: 10px; | padding-top: 10px; | ||||
} | } | ||||
/* line 829, ../sass/screen.scss */ | |||||
/* line 834, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi .header .logo img { | .communiquer-mode-emploi .header .logo img { | ||||
width: 75px; | width: 75px; | ||||
} | } | ||||
/* line 835, ../sass/screen.scss */ | |||||
/* line 840, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi .header h1 { | .communiquer-mode-emploi .header h1 { | ||||
font-family: "comfortaaregular"; | font-family: "comfortaaregular"; | ||||
font-size: 40px; | font-size: 40px; | ||||
margin-bottom: 0px; | margin-bottom: 0px; | ||||
font-weight: normal; | font-weight: normal; | ||||
} | } | ||||
/* line 843, ../sass/screen.scss */ | |||||
/* line 848, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi .header h2 { | .communiquer-mode-emploi .header h2 { | ||||
margin-top: 0px; | margin-top: 0px; | ||||
font-family: "myriadpro-regular"; | font-family: "myriadpro-regular"; | ||||
left: 2px; | left: 2px; | ||||
font-weight: normal; | font-weight: normal; | ||||
} | } | ||||
/* line 854, ../sass/screen.scss */ | |||||
/* line 859, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi h3 { | .communiquer-mode-emploi h3 { | ||||
font-family: "comfortaalight"; | font-family: "comfortaalight"; | ||||
font-family: "myriadpro-regular"; | font-family: "myriadpro-regular"; | ||||
margin-bottom: 0px; | margin-bottom: 0px; | ||||
} | } | ||||
/* line 864, ../sass/screen.scss */ | |||||
/* line 869, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-encart { | .communiquer-mode-emploi-encart { | ||||
width: 420px; | width: 420px; | ||||
margin-top: 20px; | margin-top: 20px; | ||||
} | } | ||||
/* line 868, ../sass/screen.scss */ | |||||
/* line 873, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-encart .header .logo { | .communiquer-mode-emploi-encart .header .logo { | ||||
width: 60px; | width: 60px; | ||||
margin-right: 20px; | margin-right: 20px; | ||||
padding-top: 5px; | padding-top: 5px; | ||||
} | } | ||||
/* line 873, ../sass/screen.scss */ | |||||
/* line 878, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-encart .header .logo img { | .communiquer-mode-emploi-encart .header .logo img { | ||||
width: 60px; | width: 60px; | ||||
} | } | ||||
/* line 879, ../sass/screen.scss */ | |||||
/* line 884, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-encart .header h1 { | .communiquer-mode-emploi-encart .header h1 { | ||||
margin-bottom: 3px; | margin-bottom: 3px; | ||||
} | } | ||||
/* line 888, ../sass/screen.scss */ | |||||
/* line 893, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-encart h3 { | .communiquer-mode-emploi-encart h3 { | ||||
margin-top: 15px; | margin-top: 15px; | ||||
margin-bottom: 15px; | margin-bottom: 15px; | ||||
} | } | ||||
/* line 894, ../sass/screen.scss */ | |||||
/* line 899, ../sass/screen.scss */ | |||||
.bloc-mode-emploi-pdf { | .bloc-mode-emploi-pdf { | ||||
width: 49.9%; | width: 49.9%; | ||||
float: left; | float: left; | ||||
border-bottom: dotted 1px gray; | border-bottom: dotted 1px gray; | ||||
} | } | ||||
/* line 900, ../sass/screen.scss */ | |||||
/* line 905, ../sass/screen.scss */ | |||||
.bloc-mode-emploi-border { | .bloc-mode-emploi-border { | ||||
border-right: dotted 1px gray; | border-right: dotted 1px gray; | ||||
border-bottom: dotted 1px gray; | border-bottom: dotted 1px gray; | ||||
} | } | ||||
/* line 905, ../sass/screen.scss */ | |||||
/* line 910, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-pdf { | .communiquer-mode-emploi-pdf { | ||||
border: 0px none; | border: 0px none; | ||||
-moz-border-radius: 0px; | -moz-border-radius: 0px; | ||||
margin-bottom: 0px; | margin-bottom: 0px; | ||||
padding: 20px 0px 20px 30px; | padding: 20px 0px 20px 30px; | ||||
} | } | ||||
/* line 913, ../sass/screen.scss */ | |||||
/* line 918, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-pdf .header .logo { | .communiquer-mode-emploi-pdf .header .logo { | ||||
float: left; | float: left; | ||||
width: 55px; | width: 55px; | ||||
padding-right: 15px; | padding-right: 15px; | ||||
padding-top: 10px; | padding-top: 10px; | ||||
} | } | ||||
/* line 919, ../sass/screen.scss */ | |||||
/* line 924, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-pdf .header .logo img { | .communiquer-mode-emploi-pdf .header .logo img { | ||||
width: 55px; | width: 55px; | ||||
} | } | ||||
/* line 923, ../sass/screen.scss */ | |||||
/* line 928, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-pdf .header h1 { | .communiquer-mode-emploi-pdf .header h1 { | ||||
font-size: 32px; | font-size: 32px; | ||||
} | } | ||||
/* line 926, ../sass/screen.scss */ | |||||
/* line 931, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-pdf .header h2 { | .communiquer-mode-emploi-pdf .header h2 { | ||||
font-size: 16px; | font-size: 16px; | ||||
} | } | ||||
/* line 931, ../sass/screen.scss */ | |||||
/* line 936, ../sass/screen.scss */ | |||||
.communiquer-mode-emploi-pdf h3 { | .communiquer-mode-emploi-pdf h3 { | ||||
font-weight: normal; | font-weight: normal; | ||||
} | } | ||||
/* line 936, ../sass/screen.scss */ | |||||
/* line 941, ../sass/screen.scss */ | |||||
.bloc-mode-emploi-bottom { | .bloc-mode-emploi-bottom { | ||||
border-bottom: 0px none; | border-bottom: 0px none; | ||||
border-bottom: solid 1px white; | border-bottom: solid 1px white; | ||||
} | } | ||||
/* commandes auto */ | /* commandes auto */ | ||||
/* line 946, ../sass/screen.scss */ | |||||
/* line 951, ../sass/screen.scss */ | |||||
.commandeauto-form #bloc-select-user { | .commandeauto-form #bloc-select-user { | ||||
padding-left: 0px; | padding-left: 0px; | ||||
} | } | ||||
/* line 950, ../sass/screen.scss */ | |||||
/* line 955, ../sass/screen.scss */ | |||||
.commandeauto-form #or-user { | .commandeauto-form #or-user { | ||||
font-size: 20px; | font-size: 20px; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 953, ../sass/screen.scss */ | |||||
/* line 958, ../sass/screen.scss */ | |||||
.commandeauto-form #or-user span { | .commandeauto-form #or-user span { | ||||
position: relative; | position: relative; | ||||
top: 24px; | top: 24px; | ||||
} | } | ||||
/* line 959, ../sass/screen.scss */ | |||||
/* line 964, ../sass/screen.scss */ | |||||
.commandeauto-form .field-commandeautoform-id_etablissement { | .commandeauto-form .field-commandeautoform-id_etablissement { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 963, ../sass/screen.scss */ | |||||
/* line 968, ../sass/screen.scss */ | |||||
.commandeauto-form .jours .form-group { | .commandeauto-form .jours .form-group { | ||||
float: left; | float: left; | ||||
margin-right: 20px; | margin-right: 20px; | ||||
} | } | ||||
/* line 970, ../sass/screen.scss */ | |||||
/* line 975, ../sass/screen.scss */ | |||||
.commandeauto-form .produits .table { | .commandeauto-form .produits .table { | ||||
width: 500px; | width: 500px; | ||||
} | } | ||||
/* line 973, ../sass/screen.scss */ | |||||
/* line 978, ../sass/screen.scss */ | |||||
.commandeauto-form .produits .quantite { | .commandeauto-form .produits .quantite { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* points de vente */ | /* points de vente */ | ||||
/* line 982, ../sass/screen.scss */ | |||||
/* line 987, ../sass/screen.scss */ | |||||
.point-vente-form #pointvente-users { | .point-vente-form #pointvente-users { | ||||
display: none; | display: none; | ||||
height: 500px; | height: 500px; | ||||
overflow-y: scroll; | overflow-y: scroll; | ||||
} | } | ||||
/* line 986, ../sass/screen.scss */ | |||||
/* line 991, ../sass/screen.scss */ | |||||
.point-vente-form #pointvente-users label { | .point-vente-form #pointvente-users label { | ||||
font-weight: normal; | font-weight: normal; | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 990, ../sass/screen.scss */ | |||||
/* line 995, ../sass/screen.scss */ | |||||
.point-vente-form #pointvente-users .commentaire { | .point-vente-form #pointvente-users .commentaire { | ||||
display: none; | display: none; | ||||
margin-left: 17px; | margin-left: 17px; | ||||
} | } | ||||
/* utilisateurs */ | /* utilisateurs */ | ||||
/* line 1001, ../sass/screen.scss */ | |||||
/* line 1006, ../sass/screen.scss */ | |||||
.user-index .input-group { | .user-index .input-group { | ||||
width: 180px; | width: 180px; | ||||
} | } | ||||
/* line 1004, ../sass/screen.scss */ | |||||
/* line 1009, ../sass/screen.scss */ | |||||
.user-index .input-group .input-credit { | .user-index .input-group .input-credit { | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* facturation */ | /* facturation */ | ||||
/* line 1012, ../sass/screen.scss */ | |||||
/* line 1017, ../sass/screen.scss */ | |||||
#estimation-facture { | #estimation-facture { | ||||
text-align: center; | text-align: center; | ||||
margin-bottom: 30px; | margin-bottom: 30px; | ||||
padding-bottom: 20px; | padding-bottom: 20px; | ||||
background-color: #F9F9F9; | background-color: #F9F9F9; | ||||
} | } | ||||
/* line 1018, ../sass/screen.scss */ | |||||
/* line 1023, ../sass/screen.scss */ | |||||
#estimation-facture h2 { | #estimation-facture h2 { | ||||
font-family: "myriadpro-it"; | font-family: "myriadpro-it"; | ||||
} | } | ||||
/* line 1022, ../sass/screen.scss */ | |||||
/* line 1027, ../sass/screen.scss */ | |||||
#estimation-facture .montant span { | #estimation-facture .montant span { | ||||
font-size: 25px; | font-size: 25px; | ||||
color: white; | color: white; |
$('[data-toggle="tooltip"]').tooltip(); | $('[data-toggle="tooltip"]').tooltip(); | ||||
} | } | ||||
function chat_nl2br(str, is_xhtml) { | |||||
var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>'; | |||||
return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ breakTag +'$2'); | |||||
} | |||||
function chat_points_vente_acces() { | function chat_points_vente_acces() { | ||||
// affichage du bloc acces restreint | // affichage du bloc acces restreint | ||||
$('#pointvente-acces_restreint').change(function() { | $('#pointvente-acces_restreint').change(function() { | ||||
// affiche la commande | // affiche la commande | ||||
var id_commande = $(this).data('id-commande') ; | var id_commande = $(this).data('id-commande') ; | ||||
chat_index_commandes_affiche_commande(id_commande) ; | |||||
chat_index_commandes_affiche_commande(id_pv, id_commande) ; | |||||
}) ; | }) ; | ||||
$('#commandes-points-vente .bloc-point-vente').each(function() { | $('#commandes-points-vente .bloc-point-vente').each(function() { | ||||
$('#point-vente-'+id_pv+' .liste-commandes a.active').parent().remove() ; | $('#point-vente-'+id_pv+' .liste-commandes a.active').parent().remove() ; | ||||
if($('#point-vente-'+id_pv+' .liste-commandes li').size()) { | if($('#point-vente-'+id_pv+' .liste-commandes li').size()) { | ||||
chat_index_commandes_affiche_commande(commande_next.data('id-commande')) ; | |||||
chat_index_commandes_affiche_commande(id_pv, commande_next.data('id-commande')) ; | |||||
} | } | ||||
else { | else { | ||||
$('#point-vente-'+id_pv+' .liste-commandes').hide() ; | $('#point-vente-'+id_pv+' .liste-commandes').hide() ; | ||||
$('#point-vente-'+id_pv+' .btn-cancel').unbind('click').click(function() { | $('#point-vente-'+id_pv+' .btn-cancel').unbind('click').click(function() { | ||||
$('#point-vente-'+id_pv+' .buttons-edit-remove').show() ; | $('#point-vente-'+id_pv+' .buttons-edit-remove').show() ; | ||||
$('#point-vente-'+id_pv+' .buttons-save-cancel').hide() ; | $('#point-vente-'+id_pv+' .buttons-save-cancel').hide() ; | ||||
chat_index_commandes_affiche_commande($(this).data('id-commande')) ; | |||||
$('#point-vente-'+id_pv+' .btn-save').removeClass('is-create') ; | |||||
chat_index_commandes_affiche_commande(id_pv, $(this).data('id-commande')) ; | |||||
}) ; | }) ; | ||||
// save | // save | ||||
id_pv: id_pv, | id_pv: id_pv, | ||||
id_user: $('#point-vente-'+id_pv+' .user-id').val(), | id_user: $('#point-vente-'+id_pv+' .user-id').val(), | ||||
username: $('#point-vente-'+id_pv+' .username').val(), | username: $('#point-vente-'+id_pv+' .username').val(), | ||||
produits: JSON.stringify(tab_produits) | |||||
produits: JSON.stringify(tab_produits), | |||||
commentaire: $('#point-vente-'+id_pv+' .textarea-commentaire').val() | |||||
}, function(data) { | }, function(data) { | ||||
$('#point-vente-'+id_pv+' .btn-save').removeAttr('disabled') ; | $('#point-vente-'+id_pv+' .btn-save').removeAttr('disabled') ; | ||||
$('#point-vente-'+id_pv+' .btn-save').removeClass('is-create') ; | $('#point-vente-'+id_pv+' .btn-save').removeClass('is-create') ; | ||||
$('#point-vente-'+id_pv+' .user-id').val(0) ; | $('#point-vente-'+id_pv+' .user-id').val(0) ; | ||||
$('#point-vente-'+id_pv+' .user-id').val('') ; | $('#point-vente-'+id_pv+' .user-id').val('') ; | ||||
chat_index_commandes_affiche_commande(data.id_commande) ; | |||||
chat_index_commandes_affiche_commande(id_pv, data.id_commande) ; | |||||
chat_alert('success', 'Commande créée') ; | chat_alert('success', 'Commande créée') ; | ||||
}, 'json') ; | }, 'json') ; | ||||
} | } | ||||
r: 'commande/ajax-update', | r: 'commande/ajax-update', | ||||
id_commande: id_commande, | id_commande: id_commande, | ||||
produits: JSON.stringify(tab_produits), | produits: JSON.stringify(tab_produits), | ||||
date: $('#date-production').val() | |||||
date: $('#date-production').val(), | |||||
commentaire: $('#point-vente-'+id_pv+' .textarea-commentaire').val() | |||||
}, function(data) { | }, function(data) { | ||||
$('#point-vente-'+id_pv+' .btn-save').removeAttr('disabled') ; | $('#point-vente-'+id_pv+' .btn-save').removeAttr('disabled') ; | ||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande); | $('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande); | ||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').html(data.json_commande.str_montant) ; | $('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').html(data.json_commande.str_montant) ; | ||||
chat_index_commandes_affiche_commande(id_commande) ; | |||||
chat_index_commandes_affiche_commande(id_pv, id_commande) ; | |||||
chat_index_commandes_maj_recap_pv(id_pv, data.total_pv) ; | chat_index_commandes_maj_recap_pv(id_pv, data.total_pv) ; | ||||
$('#point-vente-'+id_pv+' .buttons-edit-remove').show() ; | $('#point-vente-'+id_pv+' .buttons-edit-remove').show() ; | ||||
$('#point-vente-'+id_pv+' .commentaire').hide() ; | $('#point-vente-'+id_pv+' .commentaire').hide() ; | ||||
$('#point-vente-'+id_pv+' .btn-save').addClass('is-create'); | $('#point-vente-'+id_pv+' .btn-save').addClass('is-create'); | ||||
if($('#point-vente-'+id_pv+' .liste-commandes li').size() == 0) { | |||||
$('#point-vente-'+id_pv+' .btn-cancel').hide() ; | |||||
} | |||||
else { | |||||
$('#point-vente-'+id_pv+' .btn-cancel').show() ; | |||||
} | |||||
/*if(!$('#point-vente-'+id_pv+' .btn-cancel').data('id-commande') && | |||||
$('#point-vente-'+id_pv+' .liste-commandes li').size()) { | |||||
$('#point-vente-'+id_pv+' .btn-cancel').data('id-commande',$('#point-vente-'+id_pv+' .liste-commandes li:first a').data('id-commande')) ; | |||||
}*/ | |||||
$('#point-vente-'+id_pv+' .btn-save').data('id-commande',0) ; | |||||
chat_index_commandes_inputs_commande(id_pv, false) ; | chat_index_commandes_inputs_commande(id_pv, false) ; | ||||
if(nb_commandes == 0) { | if(nb_commandes == 0) { | ||||
$('#point-vente-'+id_pv+' .recap-pv .commandes').html('Aucune commande') ; | $('#point-vente-'+id_pv+' .recap-pv .commandes').html('Aucune commande') ; | ||||
$('#point-vente-'+id_pv+' .recap-pv .recettes').hide() ; | $('#point-vente-'+id_pv+' .recap-pv .recettes').hide() ; | ||||
$('#point-vente-'+id_pv+' .liste-commandes').addClass('no-commande') ; | |||||
} | } | ||||
else if(nb_commandes == 1) { | else if(nb_commandes == 1) { | ||||
$('#point-vente-'+id_pv+' .recap-pv .commandes').html('1 commande') ; | $('#point-vente-'+id_pv+' .recap-pv .commandes').html('1 commande') ; | ||||
$('#point-vente-'+id_pv+' .recap-pv .recettes').show() ; | $('#point-vente-'+id_pv+' .recap-pv .recettes').show() ; | ||||
$('#point-vente-'+id_pv+' .liste-commandes').removeClass('no-commande') ; | |||||
} | } | ||||
else { | else { | ||||
$('#point-vente-'+id_pv+' .recap-pv .commandes').html(nb_commandes+' commandes') ; | $('#point-vente-'+id_pv+' .recap-pv .commandes').html(nb_commandes+' commandes') ; | ||||
$('#point-vente-'+id_pv+' .recap-pv .recettes').show() ; | $('#point-vente-'+id_pv+' .recap-pv .recettes').show() ; | ||||
$('#point-vente-'+id_pv+' .liste-commandes').removeClass('no-commande') ; | |||||
} | } | ||||
$('#btn-point-vente-'+id_pv+' .badge').html(nb_commandes) ; | $('#btn-point-vente-'+id_pv+' .badge').html(nb_commandes) ; | ||||
} | } | ||||
function chat_index_commandes_inputs_commande(id_pv, use_quantite) { | function chat_index_commandes_inputs_commande(id_pv, use_quantite) { | ||||
// commentaire | |||||
$('#point-vente-'+id_pv+' .commentaire').hide() ; | |||||
$('#point-vente-'+id_pv+' .textarea-commentaire').show() ; | |||||
var id_commande = $('#point-vente-'+id_pv+' .btn-save').data('id-commande') ; | |||||
if(id_commande) { | |||||
var link = $('a[data-id-commande='+id_commande+']') ; | |||||
if(!$.isPlainObject(link.attr('data-commande'))) { | |||||
var commande = JSON.parse(link.attr('data-commande')) ; | |||||
if(commande.commentaire && commande.commentaire.length) | |||||
$('#point-vente-'+id_pv+' .textarea-commentaire').val(commande.commentaire) ; | |||||
} | |||||
} | |||||
else { | |||||
$('#point-vente-'+id_pv+' .textarea-commentaire').val('') ; | |||||
} | |||||
// produits | |||||
$('#point-vente-'+id_pv+' .table-produits tr').each(function() { | $('#point-vente-'+id_pv+' .table-produits tr').each(function() { | ||||
var quantite = '' ; | var quantite = '' ; | ||||
if(use_quantite) | if(use_quantite) | ||||
} | } | ||||
function chat_index_commandes_affiche_commande(id_commande) { | |||||
function chat_index_commandes_affiche_commande(id_pv, id_commande) { | |||||
var link = $("a[data-id-commande="+id_commande+"]") ; | var link = $("a[data-id-commande="+id_commande+"]") ; | ||||
var id_pv = link.data('pv-id') ; | |||||
$('#point-vente-'+id_pv+' .bloc-commande').hide() ; | |||||
$('#point-vente-'+id_pv+' .liste-commandes a').removeClass('active') ; | |||||
link.addClass('active') ; | |||||
var commande = link.attr('data-commande') ; | |||||
if(!$.isPlainObject(link.attr('data-commande'))) { | |||||
commande = JSON.parse(link.attr('data-commande')) ; | |||||
} | |||||
// maj ligne commande | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').removeClass('paye') ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant .glyphicon').remove() ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').html() ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').html(commande.str_montant) ; | |||||
if(commande.montant_paye >= commande.montant) { | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').addClass('paye') ; | |||||
if(id_commande) { | |||||
$('#point-vente-'+id_pv+' .bloc-commande').hide() ; | |||||
$('#point-vente-'+id_pv+' .liste-commandes a').removeClass('active') ; | |||||
link.addClass('active') ; | |||||
var commande = link.attr('data-commande') ; | |||||
if(!$.isPlainObject(link.attr('data-commande'))) { | |||||
commande = JSON.parse(link.attr('data-commande')) ; | |||||
} | |||||
// maj ligne commande | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').removeClass('paye') ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant .glyphicon').remove() ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').html() ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').html(commande.str_montant) ; | |||||
if(commande.montant_paye >= commande.montant) { | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').addClass('paye') ; | |||||
if(commande.montant_paye > commande.montant) { | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').append(' <span class="glyphicon glyphicon-warning-sign"></span>') ; | |||||
} | |||||
} | |||||
if(commande.montant_paye > commande.montant) { | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .montant').append(' <span class="glyphicon glyphicon-warning-sign"></span>') ; | |||||
// commentaire | |||||
if(commande.commentaire && commande.commentaire.length) { | |||||
if(!$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .glyphicon-comment').size()) { | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').append(' <span class="glyphicon glyphicon-comment"></span>') ; | |||||
} | |||||
console.log(id_pv+' '+commande.commentaire) ; | |||||
$('#point-vente-'+id_pv+' .commentaire').html(chat_nl2br(commande.commentaire)).show() ; | |||||
} | } | ||||
} | |||||
// set id_commande | |||||
$('#point-vente-'+id_pv+' .btn-cancel').data('id-commande',id_commande) ; | |||||
$('#point-vente-'+id_pv+' .btn-save').data('id-commande',id_commande) ; | |||||
$('#point-vente-'+id_pv+' .btn-remove').data('id-commande',id_commande) ; | |||||
$('#point-vente-'+id_pv+' .btn-create').removeClass('is-create') ; | |||||
$('#point-vente-'+id_pv+' .buttons-edit-remove').show() ; | |||||
$('#point-vente-'+id_pv+' .buttons-save-cancel').hide() ; | |||||
$('#point-vente-'+id_pv+' .choix-user').hide() ; | |||||
$('#point-vente-'+id_pv+' .the-title').show() ; | |||||
$('#point-vente-'+id_pv+' .td-commande').html('') ; | |||||
$('#point-vente-'+id_pv+' .td-total').html('') ; | |||||
$('#point-vente-'+id_pv+' tr').removeClass('active') ; | |||||
$.each(commande.produits, function(i, item) { | |||||
$('#point-vente-'+id_pv+' .produit-'+i+' .td-commande').html(item) ; | |||||
$('#point-vente-'+id_pv+' .produit-'+i).addClass('active') ; | |||||
}) ; | |||||
$('#point-vente-'+id_pv+' .td-total').html('<span>'+commande.str_montant+'</span>') ; | |||||
$('#point-vente-'+id_pv+' .tr-total').show() ; | |||||
else { | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+'] .glyphicon-comment').remove() ; | |||||
$('#point-vente-'+id_pv+' .commentaire').hide() ; | |||||
} | |||||
// set id_commande | |||||
$('#point-vente-'+id_pv+' .btn-cancel').data('id-commande',id_commande) ; | |||||
$('#point-vente-'+id_pv+' .btn-save').data('id-commande',id_commande) ; | |||||
$('#point-vente-'+id_pv+' .btn-remove').data('id-commande',id_commande) ; | |||||
$('#point-vente-'+id_pv+' .btn-create').removeClass('is-create') ; | |||||
$('#point-vente-'+id_pv+' .buttons-edit-remove').show() ; | |||||
$('#point-vente-'+id_pv+' .buttons-save-cancel').hide() ; | |||||
$('#point-vente-'+id_pv+' .choix-user').hide() ; | |||||
$('#point-vente-'+id_pv+' .the-title').show() ; | |||||
$('#point-vente-'+id_pv+' .textarea-commentaire').hide() ; | |||||
$('#point-vente-'+id_pv+' .td-commande').html('') ; | |||||
$('#point-vente-'+id_pv+' .td-total').html('') ; | |||||
$('#point-vente-'+id_pv+' tr').removeClass('active') ; | |||||
$.each(commande.produits, function(i, item) { | |||||
$('#point-vente-'+id_pv+' .produit-'+i+' .td-commande').html(item) ; | |||||
$('#point-vente-'+id_pv+' .produit-'+i).addClass('active') ; | |||||
}) ; | |||||
$('#point-vente-'+id_pv+' .td-total').html('<span>'+commande.str_montant+'</span>') ; | |||||
$('#point-vente-'+id_pv+' .tr-total').show() ; | |||||
/*var commentaire = link.data('commentaire') ; | |||||
if(commentaire) { | |||||
$('#point-vente-'+id_pv+' .commentaire').html(commentaire).show() ; | |||||
} | |||||
else { | |||||
$('#point-vente-'+id_pv+' .commentaire').hide() ; | |||||
}*/ | |||||
$('#point-vente-'+id_pv+' .title-user span.the-title').html(link.find('.user').html()+" <small>"+link.data('date')+"</small>") ; | |||||
var commentaire = link.data('commentaire') ; | |||||
if(commentaire) { | |||||
$('#point-vente-'+id_pv+' .commentaire').html(commentaire).show() ; | |||||
$('#point-vente-'+id_pv+' .bloc-commande').fadeIn() ; | |||||
$('#point-vente-'+id_pv+' .title-user').show() ; | |||||
$('#point-vente-'+id_pv+' .tr-total').show() ; | |||||
// paiement | |||||
$.get('index.php',{ | |||||
r: 'commande/statut-paiement', | |||||
id_commande: id_commande | |||||
}, function(data) { | |||||
$('#point-vente-'+id_pv+' .bloc-commande .td-paiement').html(data.html_statut_paiement) ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande) ; | |||||
chat_index_commandes_boutons_paiement(id_pv, id_commande) ; | |||||
},'json') ; | |||||
} | } | ||||
else { | else { | ||||
$('#point-vente-'+id_pv+' .commentaire').hide() ; | |||||
$('#point-vente-'+id_pv+' .bloc-commande').hide() ; | |||||
} | } | ||||
$('#point-vente-'+id_pv+' .title-user span.the-title').html(link.find('.user').html()+" <small>"+link.data('date')+"</small>") ; | |||||
$('#point-vente-'+id_pv+' .bloc-commande').fadeIn() ; | |||||
$('#point-vente-'+id_pv+' .title-user').show() ; | |||||
$('#point-vente-'+id_pv+' .tr-total').show() ; | |||||
// paiement | |||||
$.get('index.php',{ | |||||
r: 'commande/statut-paiement', | |||||
id_commande: id_commande | |||||
}, function(data) { | |||||
$('#point-vente-'+id_pv+' .bloc-commande .td-paiement').html(data.html_statut_paiement) ; | |||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande) ; | |||||
chat_index_commandes_boutons_paiement(id_pv, id_commande) ; | |||||
},'json') ; | |||||
} | } | ||||
function chat_index_commandes_boutons_paiement(id_pv, id_commande) { | function chat_index_commandes_boutons_paiement(id_pv, id_commande) { | ||||
}, function(data) { | }, function(data) { | ||||
$('#point-vente-'+id_pv+' .bloc-commande .td-paiement').html(data.html_statut_paiement) ; | $('#point-vente-'+id_pv+' .bloc-commande .td-paiement').html(data.html_statut_paiement) ; | ||||
$('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande) ; | $('#point-vente-'+id_pv+' a[data-id-commande='+id_commande+']').attr('data-commande',data.json_commande) ; | ||||
chat_index_commandes_affiche_commande(id_commande) ; | |||||
chat_index_commandes_affiche_commande(id_pv, id_commande) ; | |||||
chat_index_commandes_boutons_paiement(id_pv, id_commande) ; | chat_index_commandes_boutons_paiement(id_pv, id_commande) ; | ||||
}, 'json') ; | }, 'json') ; | ||||
}) ; | }) ; |
margin-top: 0px ; | margin-top: 0px ; | ||||
width: 100% ; | width: 100% ; | ||||
overflow-y: scroll ; | overflow-y: scroll ; | ||||
&.no-commande { | |||||
display: none ; | |||||
} | |||||
li { | li { | ||||
padding: 0 ; | padding: 0 ; | ||||
display: none ; | display: none ; | ||||
font-size: 19px ; | font-size: 19px ; | ||||
margin-top: 0px ; | margin-top: 0px ; | ||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif ; | |||||
.btn-edit, .btn-remove, | .btn-edit, .btn-remove, | ||||
.btn-cancel, .btn-save { | .btn-cancel, .btn-save { |
'produits'=> [], | 'produits'=> [], | ||||
'montant' => $commande->montant, | 'montant' => $commande->montant, | ||||
'str_montant' => $commande->getMontantFormat(), | 'str_montant' => $commande->getMontantFormat(), | ||||
'montant_paye' => $commande->getMontantPaye() | |||||
'montant_paye' => $commande->getMontantPaye(), | |||||
'commentaire' => $commande->commentaire, | |||||
] ; | ] ; | ||||
foreach($commande->commandeProduits as $commande_produit) | foreach($commande->commandeProduits as $commande_produit) |