Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
cdf85b0d00
@ -720,7 +720,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
* @param int|array $cpt Accounting account or array of accounting account
|
* @param int|array $cpt Accounting account or array of accounting account
|
||||||
* @param string $date_start Date start
|
* @param string $date_start Date start
|
||||||
* @param string $date_end Date end
|
* @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 string $thirdparty_code Thirdparty code
|
||||||
* @param int $month Specifig month - Can be empty
|
* @param int $month Specifig month - Can be empty
|
||||||
* @param int $year Specifig year - Can be empty
|
* @param int $year Specifig year - Can be empty
|
||||||
@ -805,7 +805,7 @@ class AccountancyCategory // extends CommonObject
|
|||||||
exit();
|
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 .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
|
||||||
$sql .= " WHERE c.active = 1";
|
$sql .= " WHERE c.active = 1";
|
||||||
$sql .= " AND c.entity = " . $conf->entity;
|
$sql .= " AND c.entity = " . $conf->entity;
|
||||||
@ -829,7 +829,8 @@ class AccountancyCategory // extends CommonObject
|
|||||||
'label' => $obj->label,
|
'label' => $obj->label,
|
||||||
'formula' => $obj->formula,
|
'formula' => $obj->formula,
|
||||||
'position' => $obj->position,
|
'position' => $obj->position,
|
||||||
'category_type' => $obj->category_type
|
'category_type' => $obj->category_type,
|
||||||
|
'bc' => $obj->sens
|
||||||
);
|
);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -191,7 +191,7 @@ print '</tr>'."\n";
|
|||||||
|
|
||||||
|
|
||||||
// AGENDA REMINDER EMAIL
|
// AGENDA REMINDER EMAIL
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
if ($conf->global->MAIN_FEATURES_LEVEL == 2)
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n";
|
print '<td>'.$langs->trans('AGENDA_REMINDER_EMAIL', $langs->transnoentities("Module2300Name")).'</td>'."\n";
|
||||||
@ -208,7 +208,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AGENDA REMINDER BROWSER
|
// AGENDA REMINDER BROWSER
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
if ($conf->global->MAIN_FEATURES_LEVEL == 2)
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven">'."\n";
|
print '<tr class="oddeven">'."\n";
|
||||||
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
|
print '<td>'.$langs->trans('AGENDA_REMINDER_BROWSER').'</td>'."\n";
|
||||||
|
|||||||
@ -1324,6 +1324,7 @@ class Facture extends CommonInvoice
|
|||||||
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||||
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
||||||
$sql.= ', f.fk_incoterms, f.location_incoterms';
|
$sql.= ', f.fk_incoterms, f.location_incoterms';
|
||||||
|
$sql.= ', f.module_source, f.pos_source';
|
||||||
$sql.= ", i.libelle as libelle_incoterms";
|
$sql.= ", i.libelle as libelle_incoterms";
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid';
|
||||||
@ -1400,6 +1401,9 @@ class Facture extends CommonInvoice
|
|||||||
$this->location_incoterms = $obj->location_incoterms;
|
$this->location_incoterms = $obj->location_incoterms;
|
||||||
$this->libelle_incoterms = $obj->libelle_incoterms;
|
$this->libelle_incoterms = $obj->libelle_incoterms;
|
||||||
|
|
||||||
|
$this->module_source = $obj->module_source;
|
||||||
|
$this->pos_source = $obj->pos_source;
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
$this->fk_multicurrency = $obj->fk_multicurrency;
|
$this->fk_multicurrency = $obj->fk_multicurrency;
|
||||||
$this->multicurrency_code = $obj->multicurrency_code;
|
$this->multicurrency_code = $obj->multicurrency_code;
|
||||||
|
|||||||
@ -405,7 +405,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
// N-1
|
// N-1
|
||||||
if (! empty($arrayofaccountforfilter))
|
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) {
|
if ($return < 0) {
|
||||||
setEventMessages(null, $AccCat->errors, 'errors');
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
@ -438,7 +438,7 @@ elseif ($modecompta=="BOOKKEEPING")
|
|||||||
if (($k+1) < $start_month) $yeartoprocess++;
|
if (($k+1) < $start_month) $yeartoprocess++;
|
||||||
|
|
||||||
//var_dump($monthtoprocess.'_'.$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) {
|
if ($return < 0) {
|
||||||
setEventMessages(null, $AccCat->errors, 'errors');
|
setEventMessages(null, $AccCat->errors, 'errors');
|
||||||
$resultM=0;
|
$resultM=0;
|
||||||
|
|||||||
@ -499,7 +499,7 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
$sql .= " WHERE l.fk_commande = " . $object->id;
|
$sql .= " WHERE l.fk_commande = " . $object->id;
|
||||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
if (empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||||
$sql .= " AND l.product_type = 0";
|
$sql .= " AND l.product_type = 0";
|
||||||
$sql .= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
|
$sql .= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent, p.fk_default_warehouse"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
|
||||||
$sql .= " ORDER BY p.ref, p.label";
|
$sql .= " ORDER BY p.ref, p.label";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -267,6 +267,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_END_TO_END' where name = 'END_TO_END';
|
||||||
UPDATE llx_const set name = 'PRELEVEMENT_USTRD' where name = 'USTRD';
|
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 DROP INDEX uk_accounting_account;
|
||||||
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
|
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