Fix value not defined
This commit is contained in:
parent
4055ac82ab
commit
f9b9a9972e
@ -169,6 +169,7 @@ if ($result) {
|
|||||||
|
|
||||||
// Set accountancy code (for bank and thirdparty)
|
// Set accountancy code (for bank and thirdparty)
|
||||||
$compta_bank = $obj->account_number;
|
$compta_bank = $obj->account_number;
|
||||||
|
$compta_soc = 'NotDefined';
|
||||||
if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)')
|
if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)')
|
||||||
$compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier);
|
$compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier);
|
||||||
if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)')
|
if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)')
|
||||||
@ -225,12 +226,12 @@ if ($result) {
|
|||||||
$societestatic->id = $links[$key]['url_id'];
|
$societestatic->id = $links[$key]['url_id'];
|
||||||
$societestatic->name = $links[$key]['label'];
|
$societestatic->name = $links[$key]['label'];
|
||||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
if ($compta_soc) $tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'user') {
|
} else if ($links[$key]['type'] == 'user') {
|
||||||
$userstatic->id = $links[$key]['url_id'];
|
$userstatic->id = $links[$key]['url_id'];
|
||||||
$userstatic->name = $links[$key]['label'];
|
$userstatic->name = $links[$key]['label'];
|
||||||
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
|
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
|
||||||
$tabtp[$obj->rowid][$compta_user] += $obj->amount;
|
if ($compta_user) $tabtp[$obj->rowid][$compta_user] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'sc') {
|
} else if ($links[$key]['type'] == 'sc') {
|
||||||
$chargestatic->id = $links[$key]['url_id'];
|
$chargestatic->id = $links[$key]['url_id'];
|
||||||
$chargestatic->ref = $links[$key]['url_id'];
|
$chargestatic->ref = $links[$key]['url_id'];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user