Clean code
This commit is contained in:
parent
dbc5f5742f
commit
208306cb71
@ -307,7 +307,7 @@ foreach (array_keys($_Avery_Labels) as $codecards) {
|
||||
}
|
||||
asort($arrayoflabels);
|
||||
print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ?GETPOST('model') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '<br>'.$langs->trans("Login").': <input size="10" type="text" name="foruserlogin" value="'.GETPOST('foruserlogin').'">';
|
||||
print '<br>'.$langs->trans("Login").': <input class="with100" type="text" name="foruserlogin" value="'.GETPOST('foruserlogin').'">';
|
||||
print '<br><input type="submit" class="button small" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -515,6 +515,7 @@ if ($action == 'create') {
|
||||
// Show fields of bank account
|
||||
$sizecss = '';
|
||||
foreach ($object->getFieldsToShow() as $val) {
|
||||
$content = '';
|
||||
if ($val == 'BankCode') {
|
||||
$name = 'code_banque';
|
||||
$sizecss = 'minwidth100';
|
||||
@ -534,7 +535,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
print '<td>'.$langs->trans($val).'</td>';
|
||||
print '<td><input type="text" class="flat '.$sizecss.'" name="'.$name.'" value="'.(GETPOST($name) ?GETPOST($name, 'alpha') : $content).'"></td>';
|
||||
print '<td><input type="text" class="flat '.$sizecss.'" name="'.$name.'" value="'.(GETPOSTISSET($name) ? GETPOST($name, 'alpha') : $content).'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
$ibankey = FormBank::getIBANLabel($object);
|
||||
@ -545,10 +546,10 @@ if ($action == 'create') {
|
||||
|
||||
// IBAN
|
||||
print '<tr><td>'.$langs->trans($ibankey).'</td>';
|
||||
print '<td><input maxlength="34" type="text" class="flat minwidth300" name="iban" value="'.(GETPOST('iban') ?GETPOST('iban', 'alpha') : $object->iban).'"></td></tr>';
|
||||
print '<td><input maxlength="34" type="text" class="flat minwidth300" name="iban" value="'.(GETPOSTISSET('iban') ?GETPOST('iban', 'alpha') : $object->iban).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans($bickey).'</td>';
|
||||
print '<td><input maxlength="11" type="text" class="flat minwidth150" name="bic" value="'.(GETPOST('bic') ?GETPOST('bic', 'alpha') : $object->bic).'"></td></tr>';
|
||||
print '<td><input maxlength="11" type="text" class="flat minwidth150" name="bic" value="'.(GETPOSTISSET('bic') ?GETPOST('bic', 'alpha') : $object->bic).'"></td></tr>';
|
||||
|
||||
if (isModEnabled('paymentbybanktransfer')) {
|
||||
print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td>';
|
||||
@ -559,7 +560,7 @@ if ($action == 'create') {
|
||||
|
||||
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
|
||||
print '<textarea class="flat quatrevingtpercent" name="domiciliation" rows="'.ROWS_2.'">';
|
||||
print (GETPOST('domiciliation') ?GETPOST('domiciliation') : $object->domiciliation);
|
||||
print (GETPOSTISSET('domiciliation') ?GETPOST('domiciliation') : $object->domiciliation);
|
||||
print "</textarea></td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
|
||||
@ -730,6 +731,7 @@ if ($action == 'create') {
|
||||
|
||||
// Show fields of bank account
|
||||
foreach ($object->getFieldsToShow() as $val) {
|
||||
$content = '';
|
||||
if ($val == 'BankCode') {
|
||||
$content = $object->code_banque;
|
||||
} elseif ($val == 'DeskCode') {
|
||||
@ -1034,31 +1036,32 @@ if ($action == 'create') {
|
||||
|
||||
// If bank account
|
||||
print '<tr class="liste_titre_add"><td class="titlefieldcreate">'.$langs->trans("BankName").'</td>';
|
||||
print '<td><input size="30" type="text" class="flat" name="bank" value="'.$object->bank.'"></td>';
|
||||
print '<td><input type="text" class="flat width300" name="bank" value="'.$object->bank.'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Show fields of bank account
|
||||
foreach ($object->getFieldsToShow() as $val) {
|
||||
$content = '';
|
||||
if ($val == 'BankCode') {
|
||||
$name = 'code_banque';
|
||||
$size = 8;
|
||||
$css = 'with100';
|
||||
$content = $object->code_banque;
|
||||
} elseif ($val == 'DeskCode') {
|
||||
$name = 'code_guichet';
|
||||
$size = 8;
|
||||
$css = 'with100';
|
||||
$content = $object->code_guichet;
|
||||
} elseif ($val == 'BankAccountNumber') {
|
||||
$name = 'number';
|
||||
$size = 18;
|
||||
$css = 'with200';
|
||||
$content = $object->number;
|
||||
} elseif ($val == 'BankAccountNumberKey') {
|
||||
$name = 'cle_rib';
|
||||
$size = 3;
|
||||
$css = 'with50';
|
||||
$content = $object->cle_rib;
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans($val).'</td>';
|
||||
print '<td><input size="'.$size.'" type="text" class="flat" name="'.$name.'" value="'.$content.'"></td>';
|
||||
print '<td><input type="text" class="flat '.$css.'" name="'.$name.'" value="'.dol_escape_htmltag($content).'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -415,8 +415,6 @@ if ($resql) {
|
||||
$i = 0;
|
||||
$total = 0;
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
@ -511,9 +509,9 @@ if ($resql) {
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) {
|
||||
if ($user->socid == 0 && $object->statut == 0 && $_GET['action'] == '') {
|
||||
if ($user->socid == 0 && $object->statut == 0 && $action == '') {
|
||||
if ($user->rights->facture->paiement) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$id.'&facid='.$objp->facid.'&action=valide&token='.newToken().'">'.$langs->trans('Valid').'</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$id.'&action=valide&token='.newToken().'">'.$langs->trans('Valid').'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -485,13 +485,6 @@ if ($action == 'new') {
|
||||
|
||||
if (count($lines[$bid])) {
|
||||
foreach ($lines[$bid] as $lid => $value) {
|
||||
//$account_id = $bid; FIXME not used
|
||||
|
||||
// FIXME $accounts[$bid] is a label !
|
||||
/*if (! isset($accounts[$bid]))
|
||||
$accounts[$bid]=0;
|
||||
$accounts[$bid] += 1;*/
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.dol_print_date($value["date"], 'day').'</td>';
|
||||
print '<td>'.$value["numero"]."</td>\n";
|
||||
@ -525,8 +518,6 @@ if ($action == 'new') {
|
||||
print '<input id="'.$value["id"].'" class="flat checkforremise_'.$bid.'" checked type="checkbox" name="toRemise[]" value="'.$value["id"].'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
@ -2025,7 +2025,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input size="70" type="text" class="flat" name="comment" value="'.dol_escape_htmltag(GETPOST('comment', 'alpha')).'"></td>';
|
||||
print '<td class="nohover">'.$langs->trans("Comment").'</td><td class="nohover"><input class="quatrevingtpercent" type="text" class="flat" name="comment" value="'.dol_escape_htmltag(GETPOST('comment', 'alpha')).'"></td>';
|
||||
print '<td class="nohover right">';
|
||||
print '<input type="submit" class="button" name="close" value="'.$langs->trans("Disable").'"> ';
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
|
||||
@ -250,7 +250,7 @@ function limitChars(textarea, limit, infodiv)
|
||||
if ($this->withtoreadonly) {
|
||||
print (!is_array($this->withto) && !is_numeric($this->withto)) ? $this->withto : "";
|
||||
} else {
|
||||
print "<input size=\"16\" id=\"sendto\" name=\"sendto\" value=\"".dol_escape_htmltag(!is_array($this->withto) && $this->withto != '1' ? (isset($_REQUEST["sendto"]) ?GETPOST("sendto") : $this->withto) : "+")."\">";
|
||||
print '<input size="16" id="sendto" name="sendto" value="'.dol_escape_htmltag(!is_array($this->withto) && $this->withto != '1' ? (GETPOSTISSET("sendto") ? GETPOST("sendto") : $this->withto) : "+").'">';
|
||||
if (!empty($this->withtosocid) && $this->withtosocid > 0) {
|
||||
$liste = array();
|
||||
foreach ($soc->thirdparty_and_contact_phone_array() as $key => $value) {
|
||||
|
||||
@ -2654,7 +2654,8 @@ if ($action == 'create') {
|
||||
$formorder->selectInputMethod(GETPOST('methodecommande'), "methodecommande", 1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Comment").'</td><td><input size="40" type="text" name="comment" value="'.GETPOST('comment').'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Comment").'</td><td><input class="quatrevingtpercent" type="text" name="comment" value="'.GETPOST('comment').'"></td></tr>';
|
||||
|
||||
print '<tr><td class="center" colspan="2">';
|
||||
print '<input type="submit" name="makeorder" class="button" value="'.$langs->trans("ToOrder").'">';
|
||||
print ' ';
|
||||
@ -2720,7 +2721,7 @@ if ($action == 'create') {
|
||||
print $form->selectarray("type", $liv);
|
||||
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Comment").'</td><td><input size="40" type="text" name="comment"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Comment").'</td><td><input class="quatrevingtpercent" type="text" name="comment"></td></tr>';
|
||||
print '<tr><td class="center" colspan="2">';
|
||||
print '<input type="submit" name="receive" class="button" value="'.$langs->trans("Receive").'">';
|
||||
print ' ';
|
||||
@ -2784,13 +2785,12 @@ if ($action == 'create') {
|
||||
print "<br>".$langs->trans("ErrorOccurredReviseAndRetry")."<br>";
|
||||
print '<input class="button button-cancel" type="submit" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
} else {
|
||||
$textinput_size = "50";
|
||||
// Webservice url
|
||||
print '<tr><td>'.$langs->trans("WebServiceURL").'</td><td colspan="3">'.dol_print_url($ws_url).'</td></tr>';
|
||||
//Remote User
|
||||
print '<tr><td>'.$langs->trans("User").'</td><td><input size="'.$textinput_size.'" type="text" name="ws_user"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("User").'</td><td><input class="width100" type="text" name="ws_user"></td></tr>';
|
||||
//Remote Password
|
||||
print '<tr><td>'.$langs->trans("Password").'</td><td><input size="'.$textinput_size.'" type="text" name="ws_password"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Password").'</td><td><input class="width100" type="text" name="ws_password"></td></tr>';
|
||||
//Submit button
|
||||
print '<tr><td class="center" colspan="2">';
|
||||
print '<input type="submit" class="button" id="ws_submit" name="ws_submit" value="'.$langs->trans("CreateRemoteOrder").'">';
|
||||
|
||||
@ -2649,6 +2649,7 @@ if ($action == 'create') {
|
||||
$resteapayer = price2num($object->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits, 'MT');
|
||||
|
||||
// Multicurrency
|
||||
$multicurrency_resteapayer = 0;
|
||||
if (isModEnabled("multicurrency")) {
|
||||
$multicurrency_totalpaid = $object->getSommePaiement(1);
|
||||
$multicurrency_totalcreditnotes = $object->getSumCreditNotesUsed(1);
|
||||
@ -2694,6 +2695,7 @@ if ($action == 'create') {
|
||||
|
||||
// Confirmation de la conversion de l'avoir en reduc
|
||||
if ($action == 'converttoreduc') {
|
||||
$type_fac = '';
|
||||
if ($object->type == FactureFournisseur::TYPE_STANDARD) {
|
||||
$type_fac = 'ExcessPaid';
|
||||
} elseif ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||
|
||||
@ -161,7 +161,7 @@ if ($mode == 'setup' && $user->admin) {
|
||||
case "password":
|
||||
print '<tr class="oddeven">';
|
||||
print '<td'.($key['required'] ? ' class=required' : '').'>'.$langs->trans($key['varname']).'</td>';
|
||||
print '<td><input size="32" type="'.(empty($key['type']) ? 'text' : $key['type']).'" name="setupdriver['.$i.'][value]" value="'.$conf->global->{$key['varname']}.'"';
|
||||
print '<td><input class="width100" type="'.(empty($key['type']) ? 'text' : $key['type']).'" name="setupdriver['.$i.'][value]" value="'.$conf->global->{$key['varname']}.'"';
|
||||
print isset($key['moreattributes']) ? ' '.$key['moreattributes'] : '';
|
||||
print '><input type="hidden" name="setupdriver['.$i.'][varname]" value="'.$key['varname'].'"></td>';
|
||||
print '<td> '.($key['example'] != '' ? $langs->trans("Example").' : '.$key['example'] : '').'</td>';
|
||||
|
||||
@ -2382,7 +2382,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setbarcode">';
|
||||
print '<input type="hidden" name="barcode_type_code" value="'.$object->barcode_type_code.'">';
|
||||
print '<input size="40" class="maxwidthonsmartphone" type="text" name="barcode" value="'.$tmpcode.'">';
|
||||
print '<input class="width300" class="maxwidthonsmartphone" type="text" name="barcode" value="'.$tmpcode.'">';
|
||||
print ' <input type="submit" class="button smallpaddingimp" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
|
||||
@ -525,7 +525,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { // TODO Not used by current code
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("CSSUrlForPaymentForm").'</td><td>';
|
||||
print '<input size="64" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'">';
|
||||
print '<input class="width500" type="text" name="ONLINE_PAYMENT_CSS_URL" value="'.$conf->global->ONLINE_PAYMENT_CSS_URL.'">';
|
||||
print ' <span class="opacitymedium">'.$langs->trans("Example").': http://mysite/mycss.css</span>';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user