From d5ff006171d982fb6681c4108868165f2916551f Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 27 Jan 2020 05:20:48 +0100 Subject: [PATCH 1/3] NEW: Accountancy - General ledger - Add an option to search not lettering line --- htdocs/accountancy/bookkeeping/list.php | 9 +++++++++ .../bookkeeping/thirdparty_lettering_customer.php | 12 ++++++------ .../bookkeeping/thirdparty_lettering_supplier.php | 12 ++++++------ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index d5a24a0e2e5..f7a5d336bd8 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -86,6 +86,7 @@ $search_debit = GETPOST('search_debit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'alpha'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha'); +$search_not_lettering = GETPOST('search_lettering_option', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); @@ -202,6 +203,7 @@ if (empty($reshook)) $search_debit = ''; $search_credit = ''; $search_lettering_code = ''; + $search_not_lettering=''; } // Must be after the remove filter action, before the export. @@ -312,6 +314,10 @@ if (empty($reshook)) $filter['t.lettering_code'] = $search_lettering_code; $param .= '&search_lettering_code='.urlencode($search_lettering_code); } + if (! empty($search_not_lettering)) { + $filter['t.lettering_option'] = $search_not_lettering; + $param .= '&search_not_lettering=' . urlencode($search_not_lettering); + } } if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) { @@ -444,6 +450,8 @@ if (count($filter) > 0) { $sqlwhere[] = $key.'\''.$db->idate($value).'\''; } elseif ($key == 't.credit' || $key == 't.debit') { $sqlwhere[] = natural_search($key, $value, 1, 1); + } elseif ($key == 't.lettering_option') { + $sqlwhere[] = 't.lettering_code IS NULL'; } else { $sqlwhere[] = natural_search($key, $value, 0, 1); } @@ -758,6 +766,7 @@ if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; print ''; + print '
'.$langs->trans("NotLettering").''; print ''; } // Code journal diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 9cb863aec7d..91ce9f5e31a 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -260,9 +260,9 @@ if ($resql) { print '' . dol_print_date($db->jdate($obj->doc_date), 'day') . ''; print '' . $obj->doc_ref . ''; print '' . $obj->label_compte . ''; - print '' . price($obj->debit) . ''; - print '' . price($obj->credit) . ''; - print '' . price(round($solde, 2)) . ''; + print '' . price($obj->debit) . ''; + print '' . price($obj->credit) . ''; + print '' . price(round($solde, 2)) . ''; // Journal $accountingjournal = new AccountingJournal($db); @@ -285,15 +285,15 @@ if ($resql) { print ''; print ''.$langs->trans("Total").':' . "\n"; - print '' . price($debit) . ''; - print '' . price($credit) . ''; + print '' . price($debit) . ''; + print '' . price($credit) . ''; print ''; print "\n"; print ''; print ''.$langs->trans("Balancing").':' . "\n"; print ' '; - print '' . price($credit - $debit) . ''; + print '' . price($credit - $debit) . ''; print ''; print "\n"; diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 61e5e34da99..7eca182d630 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -257,9 +257,9 @@ if ($resql) { print '' . dol_print_date($db->jdate($obj->doc_date), 'day') . ''; print '' . $obj->doc_ref . ''; print '' . $obj->label_compte . ''; - print '' . price($obj->debit) . ''; - print '' . price($obj->credit) . ''; - print '' . price(round($solde, 2)) . ''; + print '' . price($obj->debit) . ''; + print '' . price($obj->credit) . ''; + print '' . price(round($solde, 2)) . ''; // Journal $accountingjournal = new AccountingJournal($db); @@ -282,15 +282,15 @@ if ($resql) { print ''; print ''.$langs->trans("Total").':' . "\n"; - print '' . price($debit) . ''; - print '' . price($credit) . ''; + print '' . price($debit) . ''; + print '' . price($credit) . ''; print ''; print "\n"; print ''; print ''.$langs->trans("Balancing").':' . "\n"; print ' '; - print '' . price($credit - $debit) . ''; + print '' . price($credit - $debit) . ''; print ''; print "\n"; From e70e74de9479e706caec13869a48fc058079c54f Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 27 Jan 2020 05:21:56 +0100 Subject: [PATCH 2/3] NEW: Accountancy - General ledger - Add an option to search not lettering line --- htdocs/langs/en_US/accountancy.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 336bf2a35cd..b10d2cd71b3 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -270,6 +270,7 @@ ChangeBinding=Change the binding Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger ShowTutorial=Show Tutorial +NotLettering= Not lettering ## Admin ApplyMassCategories=Apply mass categories From 074e55fca585e50b890a39821721942499aa831a Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 28 Jan 2020 22:56:26 +0100 Subject: [PATCH 3/3] NEW: Accountancy - General ledger - Add an option to search not reconciled line --- htdocs/accountancy/bookkeeping/list.php | 16 ++++++++-------- htdocs/langs/en_US/accountancy.lang | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index f7a5d336bd8..bd5b780a0b6 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2019 Alexandre Spangaro + * Copyright (C) 2013-2020 Alexandre Spangaro * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France * @@ -86,7 +86,7 @@ $search_debit = GETPOST('search_debit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'alpha'); $search_lettering_code = GETPOST('search_lettering_code', 'alpha'); -$search_not_lettering = GETPOST('search_lettering_option', 'alpha'); +$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); @@ -203,7 +203,7 @@ if (empty($reshook)) $search_debit = ''; $search_credit = ''; $search_lettering_code = ''; - $search_not_lettering=''; + $search_not_reconciled=''; } // Must be after the remove filter action, before the export. @@ -314,9 +314,9 @@ if (empty($reshook)) $filter['t.lettering_code'] = $search_lettering_code; $param .= '&search_lettering_code='.urlencode($search_lettering_code); } - if (! empty($search_not_lettering)) { - $filter['t.lettering_option'] = $search_not_lettering; - $param .= '&search_not_lettering=' . urlencode($search_not_lettering); + if (! empty($search_not_reconciled)) { + $filter['t.reconciled_option'] = $search_not_reconciled; + $param .= '&search_not_reconciled=' . urlencode($search_not_reconciled); } } @@ -450,7 +450,7 @@ if (count($filter) > 0) { $sqlwhere[] = $key.'\''.$db->idate($value).'\''; } elseif ($key == 't.credit' || $key == 't.debit') { $sqlwhere[] = natural_search($key, $value, 1, 1); - } elseif ($key == 't.lettering_option') { + } elseif ($key == 't.reconciled_option') { $sqlwhere[] = 't.lettering_code IS NULL'; } else { $sqlwhere[] = natural_search($key, $value, 0, 1); @@ -766,7 +766,7 @@ if (!empty($arrayfields['t.lettering_code']['checked'])) { print ''; print ''; - print '
'.$langs->trans("NotLettering").''; + print '
'.$langs->trans("NotReconciled").''; print ''; } // Code journal diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index b10d2cd71b3..c8302b9617e 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -270,7 +270,7 @@ ChangeBinding=Change the binding Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger ShowTutorial=Show Tutorial -NotLettering= Not lettering +NotReconciled=Not reconciled ## Admin ApplyMassCategories=Apply mass categories