Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
e340a53f7c
@ -1087,8 +1087,9 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($totalamount != 0) {
|
if ($totalamount != 0) {
|
||||||
$tva_tx = $lines[$i]->tva_tx;
|
if ($numlines > 0) $numlines = $numlines-1;
|
||||||
if (! empty($lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$i]->vat_src_code.')';
|
$tva_tx = $lines[$numlines]->tva_tx;
|
||||||
|
if (! empty($lines[$numlines]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$lines[$numlines]->vat_src_code.')';
|
||||||
$amountdeposit[$tva_tx] = ($totalamount * $valuedeposit) / 100;
|
$amountdeposit[$tva_tx] = ($totalamount * $valuedeposit) / 100;
|
||||||
} else {
|
} else {
|
||||||
$amountdeposit[0] = 0;
|
$amountdeposit[0] = 0;
|
||||||
@ -1137,7 +1138,7 @@ if (empty($reshook))
|
|||||||
if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA) && $diff != 0)
|
if (!empty($conf->global->MAIN_DEPOSIT_MULTI_TVA) && $diff != 0)
|
||||||
{
|
{
|
||||||
$object->fetch_lines();
|
$object->fetch_lines();
|
||||||
$subprice_diff = $object->lines[0]->subprice - $diff / (1 + $object->lines[0]->tva_tx);
|
$subprice_diff = $object->lines[0]->subprice - $diff / (1 + $object->lines[0]->tva_tx / 100);
|
||||||
$object->updateline($object->lines[0]->id, $object->lines[0]->desc, $subprice_diff, $object->lines[0]->qty, $object->lines[0]->remise_percent, $object->lines[0]->date_start, $object->lines[0]->date_end, $object->lines[0]->tva_tx, 0, 0, 'HT', $object->lines[0]->info_bits, $object->lines[0]->product_type, 0, 0, 0, $object->lines[0]->pa_ht, $object->lines[0]->label, 0, array(), 100);
|
$object->updateline($object->lines[0]->id, $object->lines[0]->desc, $subprice_diff, $object->lines[0]->qty, $object->lines[0]->remise_percent, $object->lines[0]->date_start, $object->lines[0]->date_end, $object->lines[0]->tva_tx, 0, 0, 'HT', $object->lines[0]->info_bits, $object->lines[0]->product_type, 0, 0, 0, $object->lines[0]->pa_ht, $object->lines[0]->label, 0, array(), 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -156,6 +156,18 @@ ALTER TABLE llx_bank_account ADD INDEX idx_fk_accountancy_journal (fk_accountanc
|
|||||||
UPDATE llx_bank_account as ba set fk_accountancy_journal = (SELECT rowid FROM llx_accounting_journal as aj where ba.accountancy_journal = aj.code) where accountancy_journal not in ('1', '2', '3', '4', '5', '6', '5', '8', '9', '10', '11', '12', '13', '14', '15');
|
UPDATE llx_bank_account as ba set fk_accountancy_journal = (SELECT rowid FROM llx_accounting_journal as aj where ba.accountancy_journal = aj.code) where accountancy_journal not in ('1', '2', '3', '4', '5', '6', '5', '8', '9', '10', '11', '12', '13', '14', '15');
|
||||||
ALTER TABLE llx_bank_account ADD CONSTRAINT fk_bank_account_accountancy_journal FOREIGN KEY (fk_accountancy_journal) REFERENCES llx_accounting_journal (rowid);
|
ALTER TABLE llx_bank_account ADD CONSTRAINT fk_bank_account_accountancy_journal FOREIGN KEY (fk_accountancy_journal) REFERENCES llx_accounting_journal (rowid);
|
||||||
|
|
||||||
|
--Update general ledger for FEC format & harmonization
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_tiers varchar(32);
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN label_compte varchar(255);
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_journal varchar(32);
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN thirdparty_label varchar(255) AFTER code_tiers;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN label_operation varchar(255) AFTER label_compte;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN multicurrency_amount double AFTER sens;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN multicurrency_code varchar(255) AFTER multicurrency_amount;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN lettering_code varchar(255) AFTER multicurrency_code;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_lettering datetime AFTER lettering_code;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN journal_label varchar(255) AFTER code_journal;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_validated datetime AFTER validated;
|
||||||
|
|
||||||
ALTER TABLE llx_paiementfourn ADD COLUMN model_pdf varchar(255);
|
ALTER TABLE llx_paiementfourn ADD COLUMN model_pdf varchar(255);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
-- Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
-- Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
-- Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- This program is free software; you can redistribute it and/or modify
|
||||||
-- it under the terms of the GNU General Public License as published by
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -19,26 +19,34 @@
|
|||||||
|
|
||||||
CREATE TABLE llx_accounting_bookkeeping
|
CREATE TABLE llx_accounting_bookkeeping
|
||||||
(
|
(
|
||||||
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
entity integer DEFAULT 1 NOT NULL, -- | multi company id
|
||||||
doc_date date NOT NULL,
|
doc_date date NOT NULL, -- FEC:PieceDate
|
||||||
doc_type varchar(30) NOT NULL, -- facture_client/reglement_client/facture_fournisseur/reglement_fournisseur
|
doc_type varchar(30) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur
|
||||||
doc_ref varchar(300) NOT NULL, -- facture_client/reglement_client/... reference number
|
doc_ref varchar(300) NOT NULL, -- | facture_client/reglement_client/... reference number
|
||||||
fk_doc integer NOT NULL, -- facture_client/reglement_client/... rowid
|
fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid
|
||||||
fk_docdet integer NOT NULL, -- facture_client/reglement_client/... line rowid
|
fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid
|
||||||
code_tiers varchar(24), -- code tiers
|
code_tiers varchar(32), -- FEC:CompAuxNum | account number of auxiliary account
|
||||||
numero_compte varchar(32) NOT NULL,
|
thirdparty_label varchar(255), -- FEC:CompAuxLib | label of auxiliary account
|
||||||
label_compte varchar(128) NOT NULL,
|
numero_compte varchar(32) NOT NULL, -- FEC:CompteNum | account number
|
||||||
debit double NOT NULL,
|
label_compte varchar(255) NOT NULL, -- FEC:CompteLib | label of account
|
||||||
credit double NOT NULL,
|
label_operation varchar(255), -- FEC:EcritureLib | label of the operation
|
||||||
montant double NOT NULL,
|
debit double NOT NULL, -- FEC:Debit
|
||||||
sens varchar(1) DEFAULT NULL,
|
credit double NOT NULL, -- FEC:Credit
|
||||||
fk_user_author integer NOT NULL, -- user creating
|
montant double NOT NULL, -- FEC:Montant (Not necessary)
|
||||||
fk_user_modif integer, -- user making last change
|
sens varchar(1) DEFAULT NULL, -- FEC:Sens (Not necessary)
|
||||||
date_creation datetime, -- date de creation
|
multicurrency_amount double, -- FEC:Montantdevise
|
||||||
tms timestamp, -- date last modification
|
multicurrency_code varchar(255), -- FEC:Idevise
|
||||||
import_key varchar(14),
|
lettering_code varchar(255), -- FEC:EcritureLet
|
||||||
code_journal varchar(10) NOT NULL,
|
date_lettering datetime, -- FEC:DateLet
|
||||||
piece_num integer NOT NULL,
|
fk_user_author integer NOT NULL, -- | user creating
|
||||||
validated tinyint DEFAULT 0 NOT NULL -- 0 line not validated / 1 line validated (No deleting / No modification)
|
fk_user_modif integer, -- | user making last change
|
||||||
|
date_creation datetime, -- FEC:EcritureDate | creation date
|
||||||
|
tms timestamp, -- | date last modification
|
||||||
|
import_key varchar(14),
|
||||||
|
code_journal varchar(32) NOT NULL, -- FEC:JournalCode
|
||||||
|
journal_label varchar(255), -- FEC:JournalLib
|
||||||
|
piece_num integer NOT NULL, -- FEC:EcritureNum
|
||||||
|
validated tinyint DEFAULT 0 NOT NULL, -- | 0 line not validated / 1 line validated (No deleting / No modification)
|
||||||
|
date_validated datetime -- FEC:ValidDate
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user