From 1a71e9b4a0377f2c42ebdccd65aa73c5bd73a6cb Mon Sep 17 00:00:00 2001 From: arnaud Date: Wed, 5 Jul 2017 16:57:03 +0200 Subject: [PATCH 1/7] FIX add supplierproposaldet without price (new product) --- htdocs/supplier_proposal/card.php | 5 +++-- htdocs/supplier_proposal/class/supplier_proposal.class.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 9ed38461180..e2bfb502028 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -526,7 +526,8 @@ if (empty($reshook)) $error = 0; // Set if we used free entry or predefined product - $predef=''; + $predef=''; + $ref_fourn = GETPOST('fourn_ref'); $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); @@ -614,7 +615,7 @@ if (empty($reshook)) $price_base_type = $productsupplier->fourn_price_base_type; $type = $productsupplier->type; $label = $productsupplier->label; - $desc = $productsupplier->description; + $desc = $productsupplier->description; if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc); $tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice')); diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 8cbc3882fc4..6f973f4ce08 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2738,6 +2738,7 @@ class SupplierProposalLine extends CommonObject if (empty($this->special_code)) $this->special_code=0; if (empty($this->fk_parent_line)) $this->fk_parent_line=0; if (empty($this->fk_fournprice)) $this->fk_fournprice=0; + if (empty($this->subprice)) $this->subprice=0; if (empty($this->pa_ht)) $this->pa_ht=0; @@ -2920,6 +2921,7 @@ class SupplierProposalLine extends CommonObject if (empty($this->special_code)) $this->special_code=0; if (empty($this->fk_parent_line)) $this->fk_parent_line=0; if (empty($this->fk_fournprice)) $this->fk_fournprice=0; + if (empty($this->subprice)) $this->subprice=0; if (empty($this->pa_ht)) $this->pa_ht=0; From 3d18c71201bc22c5ff5377418812e66caf774362 Mon Sep 17 00:00:00 2001 From: alexis Algoud Date: Wed, 5 Jul 2017 17:21:37 +0200 Subject: [PATCH 2/7] FIX invoice situation VAT total rounding into PDF crabe --- .../modules/facture/doc/pdf_crabe.modules.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 52971f76770..57c8d55c983 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1120,7 +1120,26 @@ class pdf_crabe extends ModelePDFFactures } //} + // VAT + // Situations totals migth be wrong on huge amounts + if ($object->situation_cycle_ref && $object->situation_counter > 1) { + + $sum_pdf_tva = 0; + foreach($this->tva as $tvakey => $tvaval){ + $sum_pdf_tva+=$tvaval; // sum VAT amounts to compare to object + } + + if($sum_pdf_tva!=$object->total_tva) { // apply coef to recover the VAT object amount (the good one) + $coef_fix_tva = $object->total_tva / $sum_pdf_tva; + + foreach($this->tva as $tvakey => $tvaval) { + $this->tva[$tvakey]=$tvaval * $coef_fix_tva; + } + } + + } + foreach($this->tva as $tvakey => $tvaval) { if ($tvakey != 0) // On affiche pas taux 0 From f166c96ed5a5065c1fffedaefadee8b5eb972c8f Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 9 Jul 2017 13:09:17 +0200 Subject: [PATCH 3/7] Fix : script to migrate photo path --- scripts/product/migrate_picture_path.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/product/migrate_picture_path.php b/scripts/product/migrate_picture_path.php index f8624ebc040..98a5c4d51bc 100755 --- a/scripts/product/migrate_picture_path.php +++ b/scripts/product/migrate_picture_path.php @@ -104,7 +104,7 @@ function migrate_product_photospath($product) global $conf; $dir = $conf->product->multidir_output[$product->entity]; - $origin = $dir .'/'. get_exdir($product->id,2) . $product->id ."/photos"; + $origin = $dir .'/'. get_exdir($product->id,2,0,0,$product,'product') . $product->id ."/photos"; $destin = $dir.'/'.dol_sanitizeFileName($product->ref); $error = 0; From 017b654acd8c2a956d13c162b39ba2f58accc1f7 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 11 Jul 2017 17:45:16 +0200 Subject: [PATCH 4/7] FIX PgSQL --- .../install/mysql/migration/4.0.0-5.0.0.sql | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index 5f62c766a01..76c8f6df672 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -134,7 +134,7 @@ CREATE TABLE llx_product_lot_extrafields ALTER TABLE llx_product_lot_extrafields ADD INDEX idx_product_lot_extrafields (fk_object); -ALTER TABLE llx_website_page MODIFY content MEDIUMTEXT; +ALTER TABLE llx_website_page MODIFY COLUMN content MEDIUMTEXT; CREATE TABLE llx_product_warehouse_properties ( @@ -160,7 +160,7 @@ ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (accou ALTER TABLE llx_expensereport_det ADD COLUMN fk_code_ventilation integer DEFAULT 0; -ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint; +ALTER TABLE llx_c_payment_term CHANGE COLUMN fdm type_cdr tinyint; ALTER TABLE llx_facturedet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx; @@ -173,11 +173,10 @@ ALTER TABLE llx_supplier_proposaldet ADD COLUMN vat_src_code varchar(10) DEFAULT ALTER TABLE llx_supplier_proposaldet ADD COLUMN fk_unit integer DEFAULT NULL; ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT '' AFTER tva_tx; -ALTER TABLE llx_c_payment_term change fdm type_cdr tinyint; +ALTER TABLE llx_c_payment_term CHANGE COLUMN fdm type_cdr TINYINT; ALTER TABLE llx_entrepot ADD COLUMN fk_parent integer DEFAULT 0; - create table llx_resource_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, @@ -206,6 +205,8 @@ ALTER TABLE llx_overwrite_trans ADD COLUMN entity integer DEFAULT 1 NOT NULL AFT ALTER TABLE llx_mailing_cibles ADD COLUMN error_text varchar(255); ALTER TABLE llx_c_actioncomm MODIFY COLUMN type varchar(50) DEFAULT 'system' NOT NULL; +-- VPGSQL8.2 ALTER TABLE llx_c_actioncomm ALTER COLUMN type SET DEFAULT 'system'; +-- VPGSQL8.2 ALTER TABLE llx_c_actioncomm ALTER COLUMN type SET NOT NULL; create table llx_user_employment ( @@ -240,12 +241,12 @@ ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_refuse (fk_user_app DELETE FROM llx_actioncomm_resources WHERE fk_actioncomm not in (select id from llx_actioncomm); -- Sequence to removed duplicated values of llx_links. Use serveral times if you still have duplicate. -drop table tmp_links_double; +DROP TABLE tmp_links_double; --select objectid, label, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_links where label is not null group by objectid, label having count(rowid) >= 2; -create table tmp_links_double as (select objectid, label, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_links where label is not null group by objectid, label having count(rowid) >= 2); +CREATE TABLE tmp_links_double AS (SELECT objectid, label, MAX(rowid) AS max_rowid, COUNT(rowid) AS count_rowid FROM llx_links WHERE label IS NOT NULL GROUP BY objectid, label HAVING COUNT(rowid) >= 2); --select * from tmp_links_double; -delete from llx_links where (rowid, label) in (select max_rowid, label from tmp_links_double); --update to avoid duplicate, delete to delete -drop table tmp_links_double; +DELETE FROM llx_links WHERE (rowid, label) IN (SELECT max_rowid, label FROM tmp_links_double); --update to avoid duplicate, delete to delete +DROP TABLE tmp_links_double; ALTER TABLE llx_links ADD UNIQUE INDEX uk_links (objectid,label); @@ -256,8 +257,7 @@ ALTER TABLE llx_projet_task ADD UNIQUE INDEX uk_projet_task_ref (ref, entity); ALTER TABLE llx_contrat ADD COLUMN fk_user_modif integer; - -update llx_accounting_account set account_parent = 0 where account_parent = ''; +UPDATE llx_accounting_account SET account_parent = 0 WHERE account_parent = ''; -- VMYSQL4.3 ALTER TABLE llx_product_price MODIFY COLUMN date_price DATETIME NULL; -- VPGSQL8.2 ALTER TABLE llx_product_price ALTER COLUMN date_price DROP NOT NULL; @@ -268,10 +268,8 @@ ALTER TABLE llx_product_customer_price ADD COLUMN default_vat_code varchar(10) a ALTER TABLE llx_product_customer_price_log ADD COLUMN default_vat_code varchar(10) after tva_tx; ALTER TABLE llx_product_fournisseur_price ADD COLUMN default_vat_code varchar(10) after tva_tx; - ALTER TABLE llx_events MODIFY COLUMN ip varchar(250); - UPDATE llx_bank SET label= '(SupplierInvoicePayment)' WHERE label= 'Règlement fournisseur'; UPDATE llx_bank SET label= '(CustomerInvoicePayment)' WHERE label= 'Règlement client'; From cd3d18cb4d36d7f0874ee61110857495cc70463f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Jul 2017 14:16:51 +0200 Subject: [PATCH 5/7] Fix detection of payment for credit note --- htdocs/accountancy/journal/bankjournal.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index cba6f5b3987..05e54c7c167 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -169,9 +169,9 @@ if ($result) { // Set accountancy code (for bank and thirdparty) $compta_bank = $obj->account_number; - if ($obj->label == '(SupplierInvoicePayment)') + if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)') $compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier); - if ($obj->label == '(CustomerInvoicePayment)') + if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)') $compta_soc = (! empty($obj->code_compta) ? $obj->code_compta : $account_customer); $tabcompany[$obj->rowid] = array ( @@ -542,10 +542,10 @@ if ($action == 'export_csv') { $date = dol_print_date($db->jdate($val["date"]), '%d%m%Y'); $reflabel = $val["ref"]; - if ($reflabel == '(SupplierInvoicePayment)') { + if ($reflabel == '(SupplierInvoicePayment)' || $reflabel == '(SupplierInvoicePaymentBack)') { $reflabel = $langs->trans('Supplier'); } - if ($reflabel == '(CustomerInvoicePayment)') { + if ($reflabel == '(CustomerInvoicePayment)' || $reflabel == '(CustomerInvoicePaymentBack)') { $reflabel = $langs->trans('Customer'); } if ($reflabel == '(SocialContributionPayment)') { @@ -769,10 +769,10 @@ if (empty($action) || $action == 'view') { $date = dol_print_date($db->jdate($val["date"]), 'day'); $reflabel = $val["ref"]; - if ($reflabel == '(SupplierInvoicePayment)') { + if ($reflabel == '(SupplierInvoicePayment)' || $reflabel == '(SupplierInvoicePaymentBack)') { $reflabel = $langs->trans('Supplier'); } - if ($reflabel == '(CustomerInvoicePayment)') { + if ($reflabel == '(CustomerInvoicePayment)' || $reflabel == '(CustomerInvoicePaymentBack)') { $reflabel = $langs->trans('Customer'); } if ($reflabel == '(SocialContributionPayment)') { From 24ecd48b22e5fbfa2e0a81a6ab4ab18fef1d8639 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Jul 2017 03:40:20 +0200 Subject: [PATCH 6/7] Minor fix --- htdocs/compta/bank/bankentries.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index c3afc9634cf..f1ba166001e 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -102,7 +102,7 @@ $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); $pageplusone = GETPOST("pageplusone",'int'); if ($pageplusone) $page = $pageplusone - 1; -if ($page == -1) { $page = 0; } +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -130,7 +130,7 @@ if ($id > 0 || ! empty($ref)) $contextpage='banktransactionlist'.(empty($object->ref)?'':'-'.$object->id); //var_dump($contextpage); -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('banktransactionlist', $contextpage)); $extrafields = new ExtraFields($db); @@ -580,6 +580,7 @@ if ($resql) print ''; print ''; print ''; + print ''; print ''; print ''; if (GETPOST('bid')) print ''; @@ -1212,6 +1213,7 @@ if ($resql) { print '-'; } + if (! $i) $totalarray['nbfield']++; } if (! empty($arrayfields['b.num_releve']['checked'])) From f9b9a9972ebac4440825ad2cb70f5b5a98c3d8bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Jul 2017 17:22:57 +0200 Subject: [PATCH 7/7] Fix value not defined --- htdocs/accountancy/journal/bankjournal.php | 67 +++++++++++----------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 05e54c7c167..a4840e47fcf 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -83,9 +83,9 @@ if ($user->societe_id > 0 && empty($id_bank_account)) /* * Actions */ - + $error = 0; - + $year_current = strftime("%Y", dol_now()); $pastmonth = strftime("%m", dol_now()) - 1; $pastmonthyear = $year_current; @@ -163,12 +163,13 @@ if ($result) { // one line for bank jounral = tabbq // one line for thirdparty journal = tabtp $i = 0; - while ( $i < $num ) + while ( $i < $num ) { $obj = $db->fetch_object($result); // Set accountancy code (for bank and thirdparty) $compta_bank = $obj->account_number; + $compta_soc = 'NotDefined'; if ($obj->label == '(SupplierInvoicePayment)' || $obj->label == '(SupplierInvoicePaymentBack)') $compta_soc = (! empty($obj->code_compta_fournisseur) ? $obj->code_compta_fournisseur : $account_supplier); if ($obj->label == '(CustomerInvoicePayment)' || $obj->label == '(CustomerInvoicePaymentBack)') @@ -179,7 +180,7 @@ if ($result) { 'name' => $obj->name, 'code_compta' => $compta_soc, ); - + $compta_user = (! empty($obj->accountancy_code) ? $obj->accountancy_code : $account_employee); $tabuser[$obj->rowid] = array ( @@ -205,10 +206,10 @@ if ($result) { if (is_array($links)) { // Now loop on each link of record in bank. foreach ( $links as $key => $val ) { - + if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport'))) // So we excluded 'company' here { - // We save tabtype for a future use, to remember what kind of payment it is + // We save tabtype for a future use, to remember what kind of payment it is $tabtype[$obj->rowid] = $links[$key]['type']; } @@ -225,12 +226,12 @@ if ($result) { $societestatic->id = $links[$key]['url_id']; $societestatic->name = $links[$key]['label']; $tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30); - $tabtp[$obj->rowid][$compta_soc] += $obj->amount; + if ($compta_soc) $tabtp[$obj->rowid][$compta_soc] += $obj->amount; } else if ($links[$key]['type'] == 'user') { $userstatic->id = $links[$key]['url_id']; $userstatic->name = $links[$key]['label']; $tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30); - $tabtp[$obj->rowid][$compta_user] += $obj->amount; + if ($compta_user) $tabtp[$obj->rowid][$compta_user] += $obj->amount; } else if ($links[$key]['type'] == 'sc') { $chargestatic->id = $links[$key]['url_id']; $chargestatic->ref = $links[$key]['url_id']; @@ -290,7 +291,7 @@ if ($result) { $tabbq[$obj->rowid][$compta_bank] += $obj->amount; - + // Check account number is ok /*if ($action == 'writebookkeeping') // Make test now in such a case { @@ -309,7 +310,7 @@ if ($result) { setEventMessages($langs->trans('ErrorAccountancyCodeOnThirdPartyNotDefined'), null, 'errors'); } }*/ - + // if($obj->socid)$tabtp[$obj->rowid][$compta_soc] += $obj->amount; $i ++; @@ -330,16 +331,16 @@ if (! $error && $action == 'writebookkeeping') { $error = 0; foreach ( $tabpay as $key => $val ) { // $key is rowid into llx_bank - + $errorforline = 0; - + $db->begin(); - + // Bank if (! $errorforline) { // Line into bank account - foreach ( $tabbq[$key] as $k => $mt ) + foreach ( $tabbq[$key] as $k => $mt ) { if ($mt) { $bookkeeping = new BookKeeping($db); @@ -357,10 +358,10 @@ if (! $error && $action == 'writebookkeeping') { $bookkeeping->code_journal = $journal; $bookkeeping->fk_user_author = $user->id; $bookkeeping->date_create = $now; - + if ($tabtype[$key] == 'payment') { $bookkeeping->code_tiers = $tabcompany[$key]['code_compta']; - + $sqlmid = 'SELECT fac.facnumber'; $sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture fac"; $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid"; @@ -374,7 +375,7 @@ if (! $error && $action == 'writebookkeeping') { } } else if ($tabtype[$key] == 'payment_supplier') { $bookkeeping->code_tiers = $tabcompany[$key]['code_compta']; - + $sqlmid = 'SELECT facf.ref_supplier, facf.ref'; $sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf"; $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid"; @@ -388,7 +389,7 @@ if (! $error && $action == 'writebookkeeping') { } } else if ($tabtype[$key] == 'payment_expensereport') { $bookkeeping->code_tiers = $tabuser[$key]['accountancy_code']; - + $sqlmid = 'SELECT e.ref'; $sqlmid .= " FROM " . MAIN_DB_PREFIX . "expensereport as e"; $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "payment_expensereport as payer ON payer.fk_expensereport=e.rowid"; @@ -400,7 +401,7 @@ if (! $error && $action == 'writebookkeeping') { $bookkeeping->doc_ref = $objmid->ref; // Ref of expensereport } } - + $result = $bookkeeping->create($user); if ($result < 0) { if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists @@ -419,7 +420,7 @@ if (! $error && $action == 'writebookkeeping') { } } } - + // Third party if (! $errorforline) { @@ -440,7 +441,7 @@ if (! $error && $action == 'writebookkeeping') { $bookkeeping->code_journal = $journal; $bookkeeping->fk_user_author = $user->id; $bookkeeping->date_create = $now; - + if (in_array($tabtype[$key], array('sc', 'payment_sc'))) { // If payment is payment of social contribution $bookkeeping->code_tiers = ''; $bookkeeping->numero_compte = $k; @@ -459,7 +460,7 @@ if (! $error && $action == 'writebookkeeping') { $bookkeeping->code_tiers = $tabcompany[$key]['code_compta']; $bookkeeping->numero_compte = $k; } else if ($tabtype[$key] == 'payment_supplier') { // If payment is payment of supplier invoice, we get ref of invoice - + $sqlmid = 'SELECT facf.ref_supplier,facf.ref'; $sqlmid .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf "; $sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid"; @@ -479,7 +480,7 @@ if (! $error && $action == 'writebookkeeping') { //$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER; $bookkeeping->numero_compte = 'CodeNotDef'; } - + $result = $bookkeeping->create($user); if ($result < 0) { if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists @@ -498,7 +499,7 @@ if (! $error && $action == 'writebookkeeping') { } } } - + if (! $errorforline) { $db->commit(); @@ -520,7 +521,7 @@ if (! $error && $action == 'writebookkeeping') { { setEventMessages($langs->trans("GeneralLedgerSomeRecordWasNotRecorded"), null, 'warnings'); } - + $action = ''; } @@ -560,7 +561,7 @@ if ($action == 'export_csv') { if ($reflabel == '(ExpenseReportPayment)') { $reflabel = $langs->trans('Employee'); } - + $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; @@ -704,7 +705,7 @@ if (empty($action) || $action == 'view') { $invoicestatic = new Facture($db); $invoicesupplierstatic = new FactureFournisseur($db); $expensereportstatic = new ExpenseReport($db); - + llxHeader('', $langs->trans("FinanceJournal")); $nom = $langs->trans("FinanceJournal") . ' - ' . $bank_code_journal->getNomUrl(1); @@ -714,7 +715,7 @@ if (empty($action) || $action == 'view') { $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); $varlink = 'id_account=' . $id_bank_account; - + report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink); /*if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) { @@ -726,7 +727,7 @@ if (empty($action) || $action == 'view') { print '
'; print ''; print '
'; - + // TODO Avoid using js. We can use a direct link with $param print '