Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/user/edit.phtml |
<div class="table-box">
<div class="col-md-12 no-space-side">
<div class="tabs-section ">
<ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#tabs-user" data-toggle="tab">Informations</a></li>
<li><a href="#tabs-panier" data-toggle="tab">Panier personnalis�</a></li>
<li><a href="#tabs-remises" data-toggle="tab">Remises en cours</a></li>
<li><a href="#tabs-fidelitypoint" data-toggle="tab">Carte fid�lit�</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabs-user">
<section class="boxpadding">
<form action="<?php echo $this->baseUrl; ?>/backoffice/user/edituser#tabs-user" method="post">
<table class="table">
<?php echo $this->render("alert_tr.phtml"); ?>
<tr>
<td class="col-md-4"><label for="civility">Civilit�</label></td>
<td class="col-md-8">
<select name="civility" id="civility" class="form-control">
<option value="Mr" <?php if ($this->populateForm['CIVILITE'] == 'Mr') { echo 'selected'; } ?>>Monsieur</option>
<option value="Mme" <?php if ($this->populateForm['CIVILITE'] == 'Mme') { echo 'selected'; } ?>>Madame</option>
<option value="Mlle" <?php if ($this->populateForm['CIVILITE'] == 'Mlle') { echo 'selected'; } ?>>Mademoiselle</option>
</select>
</td>
</tr>
<tr>
<td ><label for="numcompte">Num�ro du compte</label></td>
<td>
<input type="text" class="form-control" name="numcompte" id="numcompte" value="<?php echo $this->populateForm['NUMCOMPTE']; ?>">
</td>
</tr>
<tr >
<td >
<label for="lastname">Nom</label>
</td>
<td>
<input type="text" class="form-control" name="lastname" id="lastname" value="<?php echo $this->populateForm['NOM']; ?>"/>
</td>
</tr>
<tr >
<td>
<label for="firstname">Pr�nom</label>
</td>
<td>
<input type="text" class="form-control" name="firstname" id="firstname" value="<?php echo $this->populateForm['PRENOM']; ?>"/>
</td>
</tr>
<tr >
<td>
<label for="email">Email</label>
</td>
<td>
<input type="text" class="form-control" name="email" id="email" value="<?php echo $this->populateForm['EMAIL']; ?>"/>
</td>
</tr>
<tr >
<td>
<label for="tel">T�l�phone</label>
</td>
<td>
<input type="text" class="form-control" name="tel" id="tel" maxlength="10" value="<?php echo $this->populateForm['TEL']; ?>"/>
</td>
</tr>
<tr>
<td><label for="fax">Fax</label></td>
<td>
<input type="text" class="form-control" name="fax" id="fax" maxlength="10" value="<?php echo $this->populateForm['FAX']; ?>">
</td>
</tr>
<tr>
<td><label for="fct">Fonction : </label></td>
<td>
<input type="text" class="form-control" name="fct" id="fct" value="<?php echo $this->populateForm['FONCTION']; ?>">
</td>
</tr>
<tr>
<td ><label for="raisonsocial">Raison sociale :</label></td>
<td>
<input type="text" class="form-control" name="raisonsocial" id="raisonsocial" value="<?php echo $this->populateForm['RAISONSOCIAL']; ?>">
</td>
</tr>
<tr>
<td><label for="adressecomplete">Adresse</label></td>
<td>
<input type="text" class="form-control" name="adressecomplete" id="adressecomplete" value="<?php echo $this->populateForm['ADRESSECOMPLETE']; ?>">
</td>
</tr>
<tr>
<td><label for="adresse">Rue</label></td>
<td>
<input type="text" class="form-control" name="adresse" id="adresse" value="<?php echo $this->populateForm['ADRESSE']; ?>">
</td>
</tr>
<tr>
<td><label for="cp">Code postal</label></td>
<td>
<input type="text" class="form-control" name="cp" id="cp" value="<?php echo $this->populateForm['CP']; ?>">
</td>
</tr>
<tr>
<td><label for="ville">Ville</label></td>
<td>
<input type="text" class="form-control" name="ville" id="ville" value="<?php echo $this->populateForm['VILLE']; ?>">
</td>
</tr>
<tr>
<td><label for="departement">D�partement</label></td>
<td>
<input type="text" class="form-control" name="departement" id="departement" value="<?php echo $this->populateForm['DEPARTEMENT']; ?>">
</td>
</tr>
<tr>
<td><label for="region">R�gion</label></td>
<td>
<input type="text" class="form-control" name="region" id="region" value="<?php echo $this->populateForm['REGION']; ?>">
</td>
</tr>
<tr>
<td><label for="pays">Pays</label></td>
<td>
<input type="text" class="form-control" name="pays" id="pays" maxlength="10" value="<?php echo $this->populateForm['PAYS']; ?>" >
</td>
</tr>
<tr>
<td><label for="siret">SIRET</label></td>
<td>
<input type="text" class="form-control" name="siret" id="siret" value="<?php echo $this->populateForm['SIRET']; ?>">
</td>
</tr>
<tr>
<td><label for="numidfisc">Num�ro d'identification fiscale</label></td>
<td>
<input type="text" class="form-control" name="numidfisc" id="numidfisc" value="<?php echo $this->populateForm['NUMIDFISC']; ?>">
</td>
</tr>
<tr>
<td><label for="codeape">Code APE</label></td>
<td>
<input type="text" class="form-control" name="codeape" id="codeape" value="<?php echo $this->populateForm['CODEAPE']; ?>">
</td>
</tr>
<tr>
<td><label for="sectactivite">Secteur d'activit�</label></td>
<td>
<input type="text" class="form-control" name="sectactivite" id="sectactivite" value="<?php echo $this->populateForm['SECTACTIVITE']; ?>">
</td>
</tr>
<tr>
<td><label for="comm">Commentaires</label></td>
<td>
<textarea class="form-control" name="comm" id="comm" ><?php echo $this->populateForm['COMMENTAIRE']; ?></textarea>
</td>
</tr>
<tr>
<td><label for="cintern">Code Interne</label></td>
<td>
<select name="cintern" id="cintern" class="form-control">
<option value="0">Selectionner un Code Interne</option>
<?php foreach ($this->listCodeIntern as $row) { ?>
<option value="<?php echo $row['ID']; ?>" <?php if ($row['ID'] == $this->populateForm['CODEINTERN']) { echo 'selected="selected"'; } ?> >
<?php echo $row['CODE'].' - '.$row['LABEL']; ?>
</option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td><label>Type</label></td>
<td>
<INPUT type=radio class="bluecheckradios" name="typeuser" id="typeuserPart" value="Particulier" <?php if ($this->populateForm['TYPE'] == 'Particulier') { echo 'checked="checked"'; } ?> ><label for="typeuserPart"> Particulier</label>
<INPUT type=radio class="bluecheckradios" name="typeuser" id="typeuserPro" value="Professionnel" <?php if ($this->populateForm['TYPE'] == 'Professionnel') { echo 'checked="checked"'; } ?> ><label for="typeuserPro"> Professionnel</label>
</td>
</tr>
<tr>
<td><label>Activer "A r�ception de la facture"</label></td>
<td>
<INPUT type=radio class="bluecheckradios" name="isrecepfacture" id="isrecepfacture1" value="Y" <?php if ($this->populateForm['isRECEPFACTURE'] == 'Y') { echo 'checked="checked"'; } ?> ><label for="isrecepfacture1"> Oui</label>
<INPUT type=radio class="bluecheckradios" name="isrecepfacture" id="isrecepfacture2" value="N" <?php if ($this->populateForm['isRECEPFACTURE'] == 'N') { echo 'checked="checked"'; } ?> ><label for="isrecepfacture2"> Non</label>
</td>
</tr>
<tr>
<td><label>Activer "Paiement diff�r�"</label></td>
<td>
<INPUT type=radio class="bluecheckradios" name="iscredit" id="iscredit1" value="1" <?php if ($this->populateForm['isCREDIT'] == 1) { echo 'checked="checked"'; } ?> ><label for="iscredit1"> Oui</label>
<INPUT type=radio class="bluecheckradios" name="iscredit" id="iscredit2" value="0" <?php if ($this->populateForm['isCREDIT'] == 0) { echo 'checked="checked"'; } ?> ><label for="iscredit2"> Non</label>
</td>
</tr>
<tr >
<td><label>Mode de paiement</label></td>
<td>
<table class="table">
<tr class="nostriped">
<td ><label for="modepaiement1">Paiement en ligne</label></td>
<td>
<input type="radio" class="bluecheckradios" id="modepaiement1" name="modepaiement" <?php if ($this->populateForm['MODEPAIEMENT'] == 1) { echo 'checked="checked"'; } ?> value="1">
</td>
</tr>
<tr class="nostriped">
<td><label for="modepaiement2">Contre remboursement</label></td>
<td >
<input type="radio" class="bluecheckradios" id="modepaiement2" name="modepaiement" <?php if ($this->populateForm['MODEPAIEMENT'] == 2) { echo 'checked="checked"'; } ?> value="2">
</td>
</tr>
<tr class="nostriped">
<td><label for="modepaiement3">A r�ception de la facture</label></td>
<td >
<input type="radio" class="bluecheckradios" id="modepaiement3" name="modepaiement" <?php if ($this->populateForm['MODEPAIEMENT'] == 6) { echo 'checked="checked"'; } ?> value="6">
</td>
</tr>
<tr class="nostriped">
<td><label>Paiement diff�r� de</label></td>
<td>
<table class="table">
<tr class="nostriped">
<td><label for="modepaiement4">30 jours</label></td>
<td>
<input type="radio" class="bluecheckradios" id="modepaiement4" name="modepaiement" <?php if ($this->populateForm['MODEPAIEMENT'] == 3) { echo 'checked="checked"'; } ?> value="3">
</td>
</tr>
<tr class="nostriped">
<td ><label for="modepaiement5">45 jours</label></td>
<td>
<input type="radio" class="bluecheckradios" id="modepaiement5" name="modepaiement" <?php if ($this->populateForm['MODEPAIEMENT'] == 4) { echo 'checked="checked"'; } ?> value="4">
</td>
</tr>
<tr class="nostriped">
<td ><label for="modepaiement6">60 jours</label></td>
<td>
<input type="radio" class="bluecheckradios" id="modepaiement6" name="modepaiement" <?php if ($this->populateForm['MODEPAIEMENT'] == 5) { echo 'checked="checked"'; } ?> value="5">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="text-center">
<input type="hidden" name="id" id="id" value="<?php echo $this->populateForm['ID']; ?>">
<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-edit"></i> Modifier</button>
</td>
</tr>
</table>
</form>
</section>
</div>
<div class="tab-pane" id="tabs-panier">
<section class="boxpadding">
<?php echo $this->render("alert.phtml"); ?>
<form action="<?php echo $this->baseUrl; ?>/backoffice/user/panieractiveall#tabs-panier" method="post">
<table class="table">
<tr>
<td><label>Statut du panier personnalis�</label></td>
<td >
<input type="radio" class="bluecheckradios" name="isActif" id="isActif1" value="Y" <?php if ($this->populateForm['isCADDYTYPE'] == 'Y') {echo 'checked="checked"'; } ?> /><label for="isActif1"> Actif</label>
<input type="radio" class="bluecheckradios" name="isActif" id="isActif2" value="N" <?php if ($this->populateForm['isCADDYTYPE'] == 'N') {echo 'checked="checked"'; } ?>/><label for="isActif2"> Inactif</label>
</td>
<td >
<input type="hidden" name="id" id="id" value="<?php echo $this->populateForm['ID']; ?>">
<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-edit"></i> Modifier</button>
</td>
</tr>
</table>
</form>
<form action="<?php echo $this->baseUrl; ?>/backoffice/user/panieradd#tabs-panier" method="post">
<table class="table">
<tr>
<td ><label for="reference">R�f�rence</label></td>
<td><input placeholder="R�f�rence du produit � remiser" type="text" name="reference" id="reference" class="form-control"></td>
<td>
<div class="col-md-6 no-space-top">
<div class="col-md-3 no-space-top"><label for="remiseeuro">Remise €</label></div>
<div class="col-md-9 no-space-top"><input placeholder="Remise � effectuer en euros" class="form-control" type="text" size="10" name="remiseeuro" id="remiseeuro" value=""></div>
</div>
<div class="col-md-6 no-space-top">
<div class="col-md-3 no-space-top"><label for="remisepour">Remise %</label></div>
<div class="col-md-9 no-space-top"><input placeholder="Remise � effectuer en pourcentage" class="form-control" type="text" size="10" name="remisepour" id="remisepour" value="" maxlength="3"></div>
</div>
</td>
<td>
<input type="hidden" name="id" id="id" value="<?php echo $this->populateForm['ID']; ?>">
<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-plus"></i> Ajouter</button>
</td>
</tr>
</table>
</form>
<?php if ($this->caddyType) { $caddyType = $this->caddyType; ?>
<table class="table">
<thead>
<tr>
<th></th>
<th style="width:400px;">Produit</th>
<th class="text-center">Prix</th>
<th class="text-center">Remise</th>
<th class="text-center">Statut</th>
<th >Quantit�</th>
<th class="text-center">Remises</th>
<th ></th>
</tr>
</thead>
<tbody>
<?php
$index = 1;
foreach($caddyType->facture_lines as $row) { ?>
<tr>
<td>
<?php if (isset($row->item_isAccessoire) && $row->item_isAccessoire == "N") { ?>
<ul class="gallerybox ">
<li>
<figure>
<a target="_blank" href="<?php echo $this->baseUrl."/backoffice/product/edit/showProduct/".$row->product_id; ?>" >
<img src="<?php echo $this->baseUrl.'/'.$row->product_url; ?>">
</a>
</figure>
</li>
</ul>
<?php } ?>
</td>
<td>
<?php echo $row->item_designation;?><br/><br/>
<?php echo "Ref. ".$this->escape($row->item_reference);?>
</td>
<td >
<?php if ($row->isPromo()) {
$prix = $row->getPrixAfterRemise(); ?>
<div class="text-remise">
<div class="text-remise-price" <?php if ($prix < 0) { echo 'style="color:red;"'; } ?>>
<?php echo number_format($prix, 2, ',', ' ').' ';?>€
</div>
<div class="text-remise-price-old" <?php if ($prix < 0) { echo 'style="color:red;"'; } ?>>
<?php echo number_format($row->item_prix, 2, ',', ' ').' ';?>€
</div>
</div>
<?php } else { ?>
<div class="text-no-remise">
<?php echo number_format($row->item_prix, 2, ',', ' ').' ';?>€
</div>
<?php } ?>
</td>
<td >
<?php if ($this->escape($row->remise_euro) > 0 ) { echo $this->escape($row->remise_euro)." €"; } ?>
<?php if ($this->escape($row->remise_pour) > 0 ) { echo $this->escape($row->remise_pour)." %"; } ?>
</td>
<td >
<?php if ($row->isCaddyTypeActif()) { ?>
<form action="<?php echo $this->baseUrl; ?>/backoffice/user/panieractive#tabs-panier" method="post">
<input type="hidden" value="<?php echo $row->caddytype_id; ?>" name="idcaddy">
<input type="hidden" value="<?php echo $caddyType->user_id; ?>" name="id">
<input type="hidden" value="N" name="isActif">
<button class="btn btn-danger" type="submit" name="edit"><i class="glyphicon glyphicon-resize-full"></i> D�sactiver</button>
</form>
<?php } else { ?>
<form action="<?php echo $this->baseUrl; ?>/backoffice/user/panieractive#tabs-panier" method="post">
<input type="hidden" value="<?php echo $row->caddytype_id; ?>" name="idcaddy">
<input type="hidden" value="<?php echo $caddyType->user_id; ?>" name="id">
<input type="hidden" value="Y" name="isActif">
<button class="btn btn-primary" type="submit" name="edit"><i class="glyphicon glyphicon-resize-small"></i> Activer</button>
</form>
<?php }?>
</td>
<td class="text-center"> <?php echo $row->caddytype_qte_total; ?> </td>
<td >
<form action="<?php echo $this->baseUrl; ?>/backoffice/user/panieredit#tabs-panier" method="post">
<div class="col-md-12 no-space-top">
<div class="col-md-4 no-space-top"><label for="remiseeuro">Remise €</label></div>
<div class="col-md-7 no-space-top"><input placeholder="Remise en euros" class="form-control" type="text" size="10" name="remiseeuro" id="remiseeuro" value=""></div>
</div>
<div class="col-md-12 no-space-top">
<div class="col-md-4 no-space-top"><label for="remisepour">Remise %</label></div>
<div class="col-md-7 no-space-top"><input placeholder="Remise en pourcentage" class="form-control" type="text" size="10" name="remisepour" id="remisepour" value="" maxlength="3"></div>
</div>
<div class="col-md-12 no-space-top text-center">
<input type="hidden" value="<?php echo $row->caddytype_id; ?>" name="idcaddy">
<input type="hidden" value="<?php echo $caddyType->user_id; ?>" name="id">
<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-edit"></i> Modifier</button>
</div>
</form>
</td>
<td>
<form action="<?php echo $this->baseUrl; ?>/backoffice/user/panierdel#tabs-panier" method="post" id="delRemisePanier<?php echo $index; ?>">
<input type="hidden" value="<?php echo $row->caddytype_id; ?>" name="idcaddy">
<input type="hidden" value="<?php echo $caddyType->user_id; ?>" name="id">
<button class="btn btn-danger btn-modal" type="button" data-toggle="ajaxModalSubmitDelete" data-form="delRemisePanier<?php echo $index; ?>" ><i class="glyphicon glyphicon-trash"></i> Supprimer</button>
</form>
</td>
</tr>
<?php $index++;} ?>
</tbody>
</table>
<?php } ?>
</section>
</div>
<div class="tab-pane" id="tabs-remises">
<section class="boxpadding">
<?php $isOneRemise = false; ?>
<table class="table">
<?php if ($this->listUser) { $isOneRemise = true; $listUser = $this->listUser; ?>
<tr >
<td >Remise sur les commandes</td>
<td >
<?php if ($this->escape($listUser['REMISEEURO']) > 0 ) { echo $this->escape($listUser['REMISEEURO'])." €"; } ?>
<?php if ($this->escape($listUser['REMISEPOUR']) > 0 ) { echo $this->escape($listUser['REMISEPOUR'])." %"; } ?>
</td>
</tr>
<?php }
if ($this->listUserBrend) { $isOneRemise = true; $listUserBrend = $this->listUserBrend;
foreach($listUserBrend as $row) { ?>
<tr >
<td >Pour les produits de la marque
<a class="btn btn-primary" target="_blank" href="<?php echo $this->baseUrl; ?>/backoffice/supplier/edit/id/<?php echo $this->escape($row['IDSUPPLIER']);?>">
<?php echo $row['BREND']; ?>
</a>
</td>
<td >
<?php if ($this->escape($row['REMISEEURO']) > 0 ) { echo $this->escape($row['REMISEEURO'])." €"; } ?>
<?php if ($this->escape($row['REMISEPOUR']) > 0 ) { echo $this->escape($row['REMISEPOUR'])." %"; } ?>
</td>
</tr>
<?php }}
if ($this->listCinternBrend) { $isOneRemise = true; $listCinternBrend = $this->listCinternBrend;
foreach($listCinternBrend as $row) {
?>
<tr >
<td >Pour le code interne
<a class="btn btn-primary" target="_blank" href="<?php echo $this->baseUrl; ?>/backoffice/user/codeinterne">
<?php echo $row['CODEINTERN'].' - '.$row['LABELINTERN'];?>
</a>
et produits de la marque
<a class="btn btn-primary" target="_blank" href="<?php echo $this->baseUrl; ?>/backoffice/supplier/edit/id/<?php echo $this->escape($row['IDSUPPLIER']);?>">
<?php echo $row['BREND']; ?>
</a>
</td>
<td >
<?php if ($this->escape($row['REMISEEURO']) > 0 ) { echo $this->escape($row['REMISEEURO'])." €"; } ?>
<?php if ($this->escape($row['REMISEPOUR']) > 0 ) { echo $this->escape($row['REMISEPOUR'])." %"; } ?>
</td>
</tr>
<?php } } ?>
<?php if (!$isOneRemise) { ?>
<tr><td colspan="2">Aucune remise n'est associ�e au client</td> </tr>
<?php } ?>
</table>
</section>
</div>
<div class="tab-pane" id="tabs-fidelitypoint">
<section class="boxpadding">
<div style="padding:10px;">
<div>Nombre de points : <?php echo $this->userfidelite['POINTFIDELITETOTAL']; ?></div>
<?php if (isset($this->listcommandfidelite) && !empty($this->listcommandfidelite)) { ?>
<div class="col-md-12">
<table class="display table" id="commandfideliteTable" width="100%">
<thead>
<tr>
<th class="text-center">R�f�rence</th>
<th class="text-center">Client</th>
<th class="no-wrap text-center">Date de la commande</th>
</tr>
</thead>
<tbody>
<?php foreach($this->listcommandfidelite as $row) { ?>
<tr>
<td class="text-center"> <a class="btn btn-primary" href="<?php echo $this->baseUrl; ?>/backoffice/command/edit/id/<?php echo $row['ID']; ?>"><span class="glyphicon glyphicon-list-alt"></span> <?php echo $this->escape($row['REFERENCE']);?></a></td>
<td class="text-center"><a class="btn btn-primary " href="<?php echo $this->baseUrl; ?>/backoffice/user/edit/id/<?php echo $row['IDUSER']; ?>" ><span class="glyphicon glyphicon-user"></span> <?php echo $row['USER_NOM'].' '.$row['USER_PRENOM'];?></a></td>
<td class="text-center"><?php
$myDate = new Zend_Date(strtotime($row['DATESTART']));
$mois = array('','Jan.', 'F�v.', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil.', 'Ao�t', 'Sept.', 'Oct.', 'Nov.', 'D�c.');
$moisComplet = array('','Janvier', 'F�vrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Ao�t', 'Septembre', 'Octobre', 'Novembre', 'D�cembre');
echo $myDate->toString("dd").' '.$mois[(int)$myDate->toString('MM')].' '.$myDate->toString("YYYY");
?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php } ?>
</div>
</section>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function(){
initTabs(window.location.hash);
initDataTable('commandfideliteTable', [[ 0, "asc" ]], [{ "orderable": true, "targets": -1, "width": "270px" }]);
});
</script>