FIX #10638
This commit is contained in:
parent
8ca6935f8b
commit
9ba6e3f8f5
@ -720,7 +720,7 @@ class AccountancyCategory // extends CommonObject
|
||||
* @param int|array $cpt Accounting account or array of accounting account
|
||||
* @param string $date_start Date start
|
||||
* @param string $date_end Date end
|
||||
* @param int $sens Sens of the account: 0: credit - debit, 1: debit - credit
|
||||
* @param int $sens Sens of the account: 0: credit - debit (use this by default), 1: debit - credit
|
||||
* @param string $thirdparty_code Thirdparty code
|
||||
* @param int $month Specifig month - Can be empty
|
||||
* @param int $year Specifig year - Can be empty
|
||||
@ -805,7 +805,7 @@ class AccountancyCategory // extends CommonObject
|
||||
exit();
|
||||
}
|
||||
|
||||
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
|
||||
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
|
||||
$sql .= " WHERE c.active = 1";
|
||||
$sql .= " AND c.entity = " . $conf->entity;
|
||||
@ -829,7 +829,8 @@ class AccountancyCategory // extends CommonObject
|
||||
'label' => $obj->label,
|
||||
'formula' => $obj->formula,
|
||||
'position' => $obj->position,
|
||||
'category_type' => $obj->category_type
|
||||
'category_type' => $obj->category_type,
|
||||
'bc' => $obj->sens
|
||||
);
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -405,7 +405,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
// N-1
|
||||
if (! empty($arrayofaccountforfilter))
|
||||
{
|
||||
$return = $AccCat->getSumDebitCredit($arrayofaccountforfilter, $date_start_previous, $date_end_previous, $cpt['dc']?$cpt['dc']:0);
|
||||
$return = $AccCat->getSumDebitCredit($arrayofaccountforfilter, $date_start_previous, $date_end_previous, $cat['dc']?$cat['dc']:0);
|
||||
|
||||
if ($return < 0) {
|
||||
setEventMessages(null, $AccCat->errors, 'errors');
|
||||
@ -438,7 +438,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
if (($k+1) < $start_month) $yeartoprocess++;
|
||||
|
||||
//var_dump($monthtoprocess.'_'.$yeartoprocess);
|
||||
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cpt['dc']?$cpt['dc']:0, 'nofilter', $monthtoprocess, $yeartoprocess);
|
||||
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cat['dc']?$cat['dc']:0, 'nofilter', $monthtoprocess, $yeartoprocess);
|
||||
if ($return < 0) {
|
||||
setEventMessages(null, $AccCat->errors, 'errors');
|
||||
$resultM=0;
|
||||
|
||||
@ -266,6 +266,12 @@ CREATE TABLE llx_pos_cash_fence(
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_END_TO_END' where name = 'END_TO_END';
|
||||
UPDATE llx_const set name = 'PRELEVEMENT_USTRD' where name = 'USTRD';
|
||||
|
||||
-- Delete duplicate accounting account not used
|
||||
|
||||
|
||||
|
||||
ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account;
|
||||
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user