diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 3f67f1ed4c6..57ce524af6b 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -363,7 +363,7 @@ if ($object->id > 0) { print '
'; print ''; - // Type Prospect/Customer/Supplier + // Nature Prospect/Customer/Supplier print ''; @@ -412,6 +412,7 @@ if ($object->id > 0) { } } print ''; + print ''; } print ''; @@ -432,8 +433,7 @@ if ($object->id > 0) { print ''; print ''; - print ''; print ''; diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index a32dd6ef1c3..026901afa32 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -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 '
'; print '
'.$langs->trans('NatureOfThirdParty').''; print $object->getTypeUrl(1); print '
'; print $form->textwithpicto($langs->trans('VATIsUsed'),$langs->trans('VATIsUsedWhenSelling')); - print ''; + print ''; print yn($object->tva_assuj); print '
'; - // Type Prospect/Customer/Supplier + // Nature Prospect/Customer/Supplier print ''; + // Prefix if (getDolGlobalString('SOCIETE_USEPREFIX')) { // Old not used prefix field - print ''; + print ''; } if ($object->fournisseur) { + $langs->load('compta'); + print ''; print ''; print ''; } - $langs->load('compta'); print ''; print ''; } - // Assujetti a TVA ou pas + // VAT is used print ''; print '
'.$langs->trans('NatureOfThirdParty').''; print $object->getTypeUrl(1); print '
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'.$langs->trans('Prefix').''.$object->prefix_comm.'
'.$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 $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->hasRight('societe', 'creer')); @@ -301,7 +309,7 @@ if ($object->id > 0) { print '
'; print $form->textwithpicto($langs->trans('VATIsUsed'), $langs->trans('VATIsUsedWhenSelling'));