Commit 59698bd5ecf337163aafdc72fc66cc4ed975fb27

Authored by aspangaro
1 parent 450aa3e7
Exists in 3.5 and in 1 other branch 3.6

Improve admin usability (based on work by marco into dolibarr project) // Kill t…

…he most longest button of the world // Inverted sens in bookkeeping for suppliers invoices
Showing 1 changed file with 11 additions and 11 deletions   Show diff stats
accountingex/journal/purchasesjournal.php
... ... @@ -23,7 +23,7 @@
23 23  
24 24 /**
25 25 * \file accountingex/journal/purchasesjournal.php
26   - * \ingroup Accounting Expert
  26 + * \ingroup Accounting Expert
27 27 * \brief Page with purchases journal
28 28 */
29 29  
... ... @@ -38,7 +38,7 @@ if (! $res && file_exists("../../../main.inc.php"))
38 38 if (! $res)
39 39 die("Include of main fails");
40 40  
41   - // Class
  41 +// Class
42 42 dol_include_once("/core/lib/report.lib.php");
43 43 dol_include_once("/core/lib/date.lib.php");
44 44 dol_include_once("/accountingex/core/lib/account.lib.php");
... ... @@ -185,9 +185,9 @@ if ($action == 'writebookkeeping') {
185 185 $bookkeeping->label_compte = $tabcompany[$key]['name'];
186 186 $bookkeeping->numero_compte = $conf->global->COMPTA_ACCOUNT_SUPPLIER;
187 187 $bookkeeping->montant = $mt;
188   - $bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
189   - $bookkeeping->debit = ($mt >= 0) ? $mt : 0;
190   - $bookkeeping->credit = ($mt < 0) ? $mt : 0;
  188 + $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
  189 + $bookkeeping->debit = ($mt <= 0) ? $mt : 0;
  190 + $bookkeeping->credit = ($mt > 0) ? $mt : 0;
191 191 $bookkeeping->code_journal = $conf->global->ACCOUNTINGEX_PURCHASE_JOURNAL;
192 192  
193 193 $bookkeeping->create();
... ... @@ -210,9 +210,9 @@ if ($action == &#39;writebookkeeping&#39;) {
210 210 $bookkeeping->label_compte = dol_trunc($val["description"], 128);
211 211 $bookkeeping->numero_compte = $k;
212 212 $bookkeeping->montant = $mt;
213   - $bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
214   - $bookkeeping->debit = ($mt < 0) ? $mt : 0;
215   - $bookkeeping->credit = ($mt >= 0) ? $mt : 0;
  213 + $bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
  214 + $bookkeeping->debit = ($mt > 0) ? $mt : 0;
  215 + $bookkeeping->credit = ($mt <= 0) ? $mt : 0;
216 216 $bookkeeping->code_journal = $conf->global->ACCOUNTINGEX_PURCHASE_JOURNAL;
217 217  
218 218 $bookkeeping->create();
... ... @@ -237,9 +237,9 @@ if ($action == &#39;writebookkeeping&#39;) {
237 237 $bookkeeping->label_compte = $langs->trans("VAT");
238 238 $bookkeeping->numero_compte = $k;
239 239 $bookkeeping->montant = $mt;
240   - $bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
241   - $bookkeeping->debit = ($mt < 0) ? $mt : 0;
242   - $bookkeeping->credit = ($mt >= 0) ? $mt : 0;
  240 + $bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
  241 + $bookkeeping->debit = ($mt > 0) ? $mt : 0;
  242 + $bookkeeping->credit = ($mt <= 0) ? $mt : 0;
243 243 $bookkeeping->code_journal = $conf->global->ACCOUNTINGEX_PURCHASE_JOURNAL;
244 244  
245 245 $bookkeeping->create();
... ...