mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX also on customer index for automatic binding
This commit is contained in:
@@ -170,6 +170,8 @@ if ($action == 'validatehistory') {
|
||||
} else {
|
||||
$num_lines = $db->num_rows($result);
|
||||
|
||||
$facture_static = new Facture($db);
|
||||
|
||||
$isSellerInEEC = isInEEC($mysoc);
|
||||
|
||||
$i = 0;
|
||||
@@ -213,6 +215,18 @@ if ($action == 'validatehistory') {
|
||||
}
|
||||
}
|
||||
|
||||
// Manage Deposit
|
||||
if (!empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT)) {
|
||||
if ($objp->description == "(DEPOSIT)" || $objp->ftype == $facture_static::TYPE_DEPOSIT) {
|
||||
$accountdeposittoventilated = new AccountingAccount($db);
|
||||
$accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1);
|
||||
$objp->code_sell_l = $accountdeposittoventilated->ref;
|
||||
$objp->code_sell_p = '';
|
||||
$objp->code_sell_t = '';
|
||||
$objp->aarowid_suggest = $accountdeposittoventilated->rowid;
|
||||
}
|
||||
}
|
||||
|
||||
if ($objp->aarowid_suggest > 0) {
|
||||
$sqlupdate = "UPDATE ".MAIN_DB_PREFIX."facturedet";
|
||||
$sqlupdate .= " SET fk_code_ventilation = ".((int) $objp->aarowid_suggest);
|
||||
|
||||
Reference in New Issue
Block a user