Debug v21

This commit is contained in:
Laurent Destailleur (aka Eldy) 2024-12-02 02:49:23 +01:00
parent 4e6d3217bc
commit c91c3a3c62
2 changed files with 22 additions and 14 deletions

View file

@ -363,7 +363,7 @@ if ($object->id > 0) {
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">';
// Type Prospect/Customer/Supplier
// Nature Prospect/Customer/Supplier
print '<tr><td class="titlefield">'.$langs->trans('NatureOfThirdParty').'</td><td>';
print $object->getTypeUrl(1);
print '</td></tr>';
@ -412,6 +412,7 @@ if ($object->id > 0) {
}
}
print '</td>';
print '</tr>';
}
print '<tr>';
@ -432,8 +433,7 @@ if ($object->id > 0) {
print '<tr>';
print '<td class="nowrap">';
print $form->textwithpicto($langs->trans('VATIsUsed'),$langs->trans('VATIsUsedWhenSelling'));
print '</td>';
print '<td>';
print '</td><td>';
print yn($object->tva_assuj);
print '</td>';
print '</tr>';

View file

@ -73,7 +73,6 @@ $langs->loadLangs(array(
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
// Security check
$id = (GETPOSTINT('socid') ? GETPOSTINT('socid') : GETPOSTINT('id'));
if ($user->socid) {
$id = $user->socid;
@ -103,7 +102,7 @@ if ($object->id > 0) {
/*
* Action
* Actions
*/
$error = 0;
$parameters = array('id' => $id);
@ -250,16 +249,19 @@ if ($object->id > 0) {
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">';
// Type Prospect/Customer/Supplier
// Nature Prospect/Customer/Supplier
print '<tr><td class="titlefield">'.$langs->trans('NatureOfThirdParty').'</td><td>';
print $object->getTypeUrl(1);
print '</td></tr>';
// Prefix
if (getDolGlobalString('SOCIETE_USEPREFIX')) { // Old not used prefix field
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
print '<tr><td>'.$langs->trans('Prefix').'</td><td>'.$object->prefix_comm.'</td></tr>';
}
if ($object->fournisseur) {
$langs->load('compta');
print '<tr>';
print '<td class="titlefield">'.$langs->trans("SupplierCode").'</td><td>';
print showValueWithClipboardCPButton(dol_escape_htmltag($object->code_fournisseur));
@ -280,18 +282,24 @@ if ($object->id > 0) {
if ($action == 'editsupplieraccountancycodegeneral' && $user->hasRight('societe', 'creer')) {
print $formaccounting->formAccountingAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->accountancy_code_supplier_general, 'supplieraccountancycodegeneral', 0, 1, '', 1);
} else {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(0, $object->accountancy_code_supplier_general, 1);
if ($object->accountancy_code_supplier_general > 0) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(0, $object->accountancy_code_supplier_general, 1);
print $accountingaccount->getNomUrl(0, 1, 1, '', 1);
print $accountingaccount->getNomUrl(0, 1, 1, '', 1);
}
if (getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')) {
if ($object->accountancy_code_supplier_general > 0) {
print ' - ';
}
$accountingAccountByDefault = '<span class="opacitymedium">' . $langs->trans("AccountingAccountByDefaultShort") . ": " . length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')) . '</span>';
print $accountingAccountByDefault;
}
}
$accountingAccountByDefault = " (" . $langs->trans("AccountingAccountByDefaultShort") . ": " . length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')) . ")";
print (getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') ? $accountingAccountByDefault : '');
print '</td>';
print '</tr>';
}
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->hasRight('societe', 'creer'));
@ -301,7 +309,7 @@ if ($object->id > 0) {
print '</tr>';
}
// Assujetti a TVA ou pas
// VAT is used
print '<tr>';
print '<td class="titlefield">';
print $form->textwithpicto($langs->trans('VATIsUsed'), $langs->trans('VATIsUsedWhenSelling'));