';
print '| '.$langs->trans("SupplierCode").' | ';
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 = '' . $langs->trans("AccountingAccountByDefaultShort") . ": " . length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')) . '';
+ print $accountingAccountByDefault;
+ }
}
- $accountingAccountByDefault = " (" . $langs->trans("AccountingAccountByDefaultShort") . ": " . length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')) . ")";
- print (getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER') ? $accountingAccountByDefault : '');
print ' | ';
print '
';
}
- $langs->load('compta');
print '';
print '| ';
print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->hasRight('societe', 'creer'));
@@ -301,7 +309,7 @@ if ($object->id > 0) {
print ' |
';
}
- // Assujetti a TVA ou pas
+ // VAT is used
print '