From f7c739bba94e8d57524ec3fbc821e6a7b8efc4fe Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Fri, 26 Jul 2019 12:12:08 +0200 Subject: [PATCH 1/5] FIX wrong path sociales/index.php doesnt exist anymore --- htdocs/compta/charges/index.php | 2 +- htdocs/compta/sociales/card.php | 2 +- htdocs/compta/sociales/list.php | 4 ++-- htdocs/compta/sociales/payments.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index f0188c5ed94..2f5802da185 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -183,7 +183,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print $socialcontrib->getNomUrl(1,'20'); print ''; // Type - print ''.$obj->lib.''; + print ''.$obj->lib.''; // Expected to pay print ''.price($obj->total).''; // Ref payment diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 6a0d53d6987..672b9003805 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -121,7 +121,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') $result=$object->delete($user); if ($result > 0) { - header("Location: index.php"); + header("Location: list.php"); exit; } else diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index be3e7ea5791..9b7dcbbe120 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -168,7 +168,7 @@ if ($resql) if ($year) { - $center=($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":""); + $center=($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":""); print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit); } else @@ -258,7 +258,7 @@ if ($resql) print ''; if ($obj->periode) { - print 'jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode),'day').''; + print 'jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode),'day').''; } else { diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 936c2c9c0f2..4025f86ff01 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -90,7 +90,7 @@ print ''; if ($mode != 'sconly') { - $center=($year?''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."":""); + $center=($year?''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."":""); print_barre_liste($title,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$center,$num,$totalnboflines, 'title_accountancy', 0, '', '', $limit, 1); } else @@ -181,7 +181,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print $socialcontrib->getNomUrl(1,'20'); print ''; // Type - print ''.$obj->lib.''; + print ''.$obj->lib.''; // Date $date=$obj->periode; if (empty($date)) $date=$obj->date_ech; From a2fc3689dace61795fd3761bb0f444fb34f5e92c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 28 Jul 2019 22:59:43 +0200 Subject: [PATCH 2/5] Nowrap on amount --- htdocs/accountancy/bookkeeping/card.php | 6 +++--- htdocs/accountancy/bookkeeping/list.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index ad7a30603dc..6de7bbfe50e 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -641,8 +641,8 @@ if ($action == 'create') print '' . $accountingaccount->getNomUrl(0,1,1,'',0) . ''; print '' . length_accounta($line->subledger_account) . ''; print '' . $line->label_operation. ''; - print '' . price($line->debit) . ''; - print '' . price($line->credit) . ''; + print '' . price($line->debit) . ''; + print '' . price($line->credit) . ''; print ''; print 'id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">'; @@ -675,7 +675,7 @@ if ($action == 'create') print $formaccounting->select_account($accountingaccount_number, 'accountingaccount_number', 1, array (), 1, 1, ''); print ''; print ''; - // TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not + // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not // use setup of keypress to select thirdparty and this hang browser on large database. if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index c8df00f6cdc..9fb1746ceac 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -683,7 +683,7 @@ if ($num > 0) // Amount debit if (! empty($arrayfields['t.debit']['checked'])) { - print '' . ($line->debit ? price($line->debit) : ''). ''; + print '' . ($line->debit ? price($line->debit) : ''). ''; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totaldebitfield']=$totalarray['nbfield']; $totalarray['totaldebit'] += $line->debit; @@ -692,7 +692,7 @@ if ($num > 0) // Amount credit if (! empty($arrayfields['t.credit']['checked'])) { - print '' . ($line->credit ? price($line->credit) : '') . ''; + print '' . ($line->credit ? price($line->credit) : '') . ''; if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalcreditfield']=$totalarray['nbfield']; $totalarray['totalcredit'] += $line->credit; @@ -754,8 +754,8 @@ if ($num > 0) if ($num < $limit && empty($offset)) print ''.$langs->trans("Total").''; else print ''.$langs->trans("Totalforthispage").''; } - elseif ($totalarray['totaldebitfield'] == $i) print ''.price($totalarray['totaldebit']).''; - elseif ($totalarray['totalcreditfield'] == $i) print ''.price($totalarray['totalcredit']).''; + elseif ($totalarray['totaldebitfield'] == $i) print ''.price($totalarray['totaldebit']).''; + elseif ($totalarray['totalcreditfield'] == $i) print ''.price($totalarray['totalcredit']).''; else print ''; } print ''; From cd22cc70c8a307f4feda0cde338b7a799712fdb3 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Jul 2019 06:41:51 +0200 Subject: [PATCH 3/5] FIX FEC Format - Save translation of the journal --- htdocs/accountancy/class/bookkeeping.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 21e43b524d7..67633e828a5 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -472,14 +472,15 @@ class BookKeeping extends CommonObject */ public function createStd(User $user, $notrigger = false, $mode='') { - global $conf; + global $conf, $langs; + + $langs->loadLangs(array("accountancy", "bills", "compta")); dol_syslog(__METHOD__, LOG_DEBUG); $error = 0; // Clean parameters - if (isset($this->doc_type)) { $this->doc_type = trim($this->doc_type); } @@ -546,7 +547,7 @@ class BookKeeping extends CommonObject $now = dol_now(); // Check parameters - // Put here code to add control on parameters values + $this->journal_label = $langs->trans($this->journal_label); // Insert request $sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . $mode.' ('; From 7a9f2b43c508958104281304c6215446c93cc4f6 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Jul 2019 07:05:18 +0200 Subject: [PATCH 4/5] FIX Language key --- htdocs/adherents/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index f0d8df454cf..a86975b606f 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1161,7 +1161,7 @@ else } // Morphy $morphys["phy"] = $langs->trans("Physical"); - $morphys["mor"] = $langs->trans("Morale"); + $morphys["mor"] = $langs->trans("Moral"); print ''.$langs->trans("Nature").''; print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy")?GETPOST("morphy",'alpha'):$object->morphy)); print ""; From 87fc3c39689a35b872902e32aaba66850a81c663 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Mon, 29 Jul 2019 13:54:48 +0200 Subject: [PATCH 5/5] FIX: expedition card: infinite loop for printObjectLine hook if return > 0 --- htdocs/expedition/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index ae9ef67f755..326d378a199 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1586,9 +1586,9 @@ if ($action == 'create') print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan),$indiceAsked); print ''; } - - $indiceAsked++; } + + $indiceAsked++; } print "";