Skip to content
Permalink
Browse files

FIX #10638

  • Loading branch information...
eldy committed Feb 23, 2019
1 parent 8ca6935 commit 9ba6e3f8f57c4e0c8c468653f9f9b8ce0c54b879
@@ -720,7 +720,7 @@ public function getCatsCpts()
* @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 @@ public function getCats($categorytype=-1)
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 @@ public function getCats($categorytype=-1)
'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 @@
// 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 @@
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);



0 comments on commit 9ba6e3f

Please sign in to comment.
You can’t perform that action at this time.