diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 0500ac4a0a756c1782898f31eea87d49b7936309..77c9a4a135e59184e222d8edf6fa4287ae6a7859 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -27,6 +27,7 @@ require '../../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; // Langs $langs->load("accountancy"); @@ -41,12 +42,24 @@ $piece_num = GETPOST("piece_num"); $mesg = ''; -$numero_compte = GETPOST('numero_compte'); +$account_number = GETPOST('account_number'); $code_tiers = GETPOST('code_tiers'); +if ($code_tiers==-1) { + $code_tiers=null; +} $label_compte = GETPOST('label_compte'); $debit = price2num(GETPOST('debit')); $credit = price2num(GETPOST('credit')); +$save=GETPOST('save'); +if (!empty($save)) { + $action='add'; +} +$update=GETPOST('update'); +if (!empty($update)) { + $action='confirm_update'; +} + if ($action == "confirm_update") { $error = 0; @@ -63,7 +76,7 @@ if ($action == "confirm_update") { if ($result < 0) { setEventMessages($book->error, $book->errors, 'errors'); } else { - $book->numero_compte = $numero_compte; + $book->numero_compte = $account_number; $book->code_tiers = $code_tiers; $book->label_compte = $label_compte; $book->debit = $debit; @@ -92,15 +105,15 @@ if ($action == "confirm_update") { else if ($action == "add") { $error = 0; - if ((intval($debit) != 0) && (intval($credit) != 0)) { - setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors'); - $error ++; - } + if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) { + setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors'); + $error ++; + } if (empty($error)) { $book = new BookKeeping($db); - $book->numero_compte = $numero_compte; + $book->numero_compte = $account_number; $book->code_tiers = $code_tiers; $book->label_compte = $label_compte; $book->debit = $debit; @@ -113,11 +126,12 @@ else if ($action == "add") { $book->fk_doc = GETPOST('fk_doc'); $book->fk_docdet = GETPOST('fk_docdet'); - if (! empty($debit)) { + if (floatval($debit) != 0.0) { $book->montant = $debit; $book->sens = 'D'; } - if (! empty($credit)) { + + if (floatval($credit) != 0.0) { $book->montant = $credit; $book->sens = 'C'; } @@ -179,6 +193,7 @@ else if ($action == "confirm_create") { llxHeader(); $html = new Form($db); +$formventilation = new FormVentilation($db); /* * Confirmation to delete the command @@ -281,9 +296,21 @@ if ($action == 'create') { } else { print load_fiche_titre($langs->trans("ListeMvts")); + + print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">'; + print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n"; + print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n"; + print '<input type="hidden" name="doc_ref" value="' . $book->doc_ref . '">' . "\n"; + print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n"; + print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n"; + print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n"; + print "<table class=\"noborder\" width=\"100%\">"; if (count($book->linesmvt) > 0) { + $total_debit=0; + $total_credit=0; + print '<tr class="liste_titre">'; print_liste_field_titre($langs->trans("Numerocompte")); @@ -301,21 +328,26 @@ if ($action == 'create') { $var = ! $var; print "<tr $bc[$var]>"; + $total_debit+=$line->debit; + $total_credit+=$line->credit; + if ($action == 'update' && $line->id == $id) { - print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">'; - print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n"; - print '<input type="hidden" name="action" value="confirm_update">' . "\n"; - print '<td><input type="text" size="6" name="numero_compte" value="' . $line->numero_compte . '"/></td>'; - print '<td><input type="text" size="15" name="code_tiers" value="' . $line->code_tiers . '"/></td>'; + + print '<td>'; + print $formventilation->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1,''); + print '</td>'; + print '<td>'; + print $formventilation->select_auxaccount($line->code_tiers, 'code_tiers',1); + print '</td>'; print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>'; print '<td><input type="text" size="6" name="debit" value="' . price($line->debit) . '"/></td>'; print '<td><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>'; print '<td>' . $line->montant . '</td>'; print '<td>' . $line->sens . '</td>'; print '<td>'; - print '<input type="submit" class="button" value="' . $langs->trans("Update") . '">'; - print '</form>'; + print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n"; + print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">'; print '</td>'; } else { print '<td>' . $line->numero_compte . '</td>'; @@ -327,10 +359,10 @@ if ($action == 'create') { print '<td>' . $line->sens . '</td>'; print '<td>'; - print '<a href="./card.php?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '">'; + print '<a href="./card.php?action=update&id=' . $line->id . '&piece_num=' . $line->piece_num . '">'; print img_edit(); print '</a> '; - print '<a href="./card.php?action=delete&id=' . $line->id . '&piece_num=' . $line->piece_num . '">'; + print '<a href="./card.php?action=delete&id=' . $line->id . '&piece_num=' . $line->piece_num . '">'; print img_delete(); print '</a>'; @@ -339,34 +371,32 @@ if ($action == 'create') { print "</tr>\n"; } + if ($total_debit!=$total_credit) { + setEventMessages(null, array('MvtNotCorrectlyBalanced',$total_credit,$total_debit),'errors'); + } + if ($action == "" || $action == 'add') { $var = ! $var; print "<tr $bc[$var]>"; - - print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">'; - print '<input type="hidden" name="action" value="add">' . "\n"; - print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n"; - print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n"; - print '<input type="hidden" name="doc_ref" value="' . $book->doc_ref . '">' . "\n"; - print '<input type="hidden" name="code_journal" value="' . $book->code_journal . '">' . "\n"; - print '<input type="hidden" name="fk_doc" value="' . $book->fk_doc . '">' . "\n"; - print '<input type="hidden" name="fk_docdet" value="' . $book->fk_docdet . '">' . "\n"; - print '<td><input type="text" size="6" name="numero_compte" value="' . $numero_compte . '"/></td>'; - print '<td><input type="text" size="15" name="code_tiers" value="' . $code_tiers . '"/></td>'; + print '<td>'; + print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, ''); + print '</td>'; + print '<td>'; + print $formventilation->select_auxaccount($code_tiers, 'code_tiers',1); + print '</td>'; print '<td><input type="text" size="15" name="label_compte" value="' . $label_compte . '"/></td>'; print '<td><input type="text" size="6" name="debit" value="' . price($debit) . '"/></td>'; print '<td><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>'; print '<td></td>'; print '<td></td>'; - print '<td><input type="submit" class="button" value="' . $langs->trans("Save") . '"></td>'; + print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '"></td>'; print '</tr>'; } print '</table>'; print '</form>'; } } - } - else { + } else { print load_fiche_titre($langs->trans("NoRecords")); } } diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 26a30171677dcf16a92b42a6cf66df900b0ecd4c..c5fea407a1200c1540412223692aca91d170d280 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -19,18 +19,17 @@ */ /** - * \file htdocs/accountancy/bookkeeping/list.php - * \ingroup Accounting Expert - * \brief List operation of book keeping + * \file htdocs/accountancy/bookkeeping/list.php + * \ingroup Accounting Expert + * \brief List operation of book keeping */ - require '../../main.inc.php'; - + // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; // Langs $langs->load("accountancy"); @@ -58,11 +57,11 @@ $formother = new FormOther($db); if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { - $search_doc_type=""; - $search_doc_ref=""; - $search_account=""; - $search_thirdparty=""; - $search_journal=""; + $search_piece_num = ""; + $search_doc_ref = ""; + $search_account = ""; + $search_thirdparty = ""; + $search_journal = ""; } /* @@ -80,8 +79,7 @@ if ($action == 'delbookkeeping') { setEventMessages($object->error, $object->errors, 'errors'); } } -} -elseif ($action == 'delbookkeepingyear') { +} elseif ($action == 'delbookkeepingyear') { $delyear = GETPOST('delyear', 'int'); @@ -93,8 +91,7 @@ elseif ($action == 'delbookkeepingyear') { setEventMessages($object->error, $object->errors, 'errors'); } } -} -elseif ($action == 'delbookkeepingyear') { +} elseif ($action == 'delbookkeepingyear') { $delyear = GETPOST('delyear', 'int'); @@ -106,7 +103,7 @@ elseif ($action == 'delbookkeepingyear') { setEventMessages($object->error, $object->errors, 'errors'); } } -}// Export +} // Export else if ($action == 'export_csv') { header('Content-Type: text/csv'); @@ -118,19 +115,55 @@ else if ($action == 'export_csv') { setEventMessages($object->error, $object->errors, 'errors'); } - foreach ( $object->linesexport as $line ) { - print $line->id . ','; - print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",'; - print '"' . $line->code_journal . '",'; - print '"' . $line->numero_compte . '",'; - print '"' . substr($line->code_journal, 0, 2) . '",'; - print '"' . substr($line->doc_ref, 0, 40) . '",'; - print '"' . $line->num_piece . '",'; - print '"' . $line->montant . '",'; - print '"' . $line->sens . '",'; - print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",'; - print '"' . $conf->currency . '",'; - print "\n"; + // Model classic Export + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 1) { + + foreach ( $object->linesexport as $line ) { + print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",'; + print '"' . $line->code_journal . '",'; + print '"' . $line->numero_compte . '",'; + print '"' . substr($line->code_journal, 0, 2) . '",'; + print '"' . substr($line->doc_ref, 0, 40) . '",'; + print '"' . $line->num_piece . '",'; + print '"' . $line->debit . '",'; + print '"' . $line->credit . '",'; + print '"' . $conf->currency . '",'; + print "\n"; + } + } + // Model cegid Export + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) { + foreach ( $object->linesexport as $line ) { + print $line->id . ','; + print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",'; + print '"' . $line->code_journal . '",'; + print '"' . $line->numero_compte . '",'; + print '"' . substr($line->code_journal, 0, 2) . '",'; + print '"' . substr($line->doc_ref, 0, 40) . '",'; + print '"' . $line->num_piece . '",'; + print '"' . $line->montant . '",'; + print '"' . $line->sens . '",'; + print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",'; + print '"' . $conf->currency . '",'; + print "\n"; + } + } + // Model Coala Export + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 3) { + foreach ( $object->linesexport as $line ) { + print $line->id . ','; + print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",'; + print '"' . $line->code_journal . '",'; + print '"' . $line->numero_compte . '",'; + print '"' . substr($line->code_journal, 0, 2) . '",'; + print '"' . substr($line->doc_ref, 0, 40) . '",'; + print '"' . $line->num_piece . '",'; + print '"' . $line->montant . '",'; + print '"' . $line->sens . '",'; + print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",'; + print '"' . $conf->currency . '",'; + print "\n"; + } } } @@ -138,16 +171,16 @@ else { llxHeader('', $langs->trans("Bookkeeping")); -/* - * List - */ + /* + * List + */ $sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num "; $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk"; if (dol_strlen(trim($search_doc_type))) { - $sql .= " WHERE bk.doc_type LIKE '%" . $search_doc_type . "%'"; + $sql .= " WHERE bk.piece_num LIKE '%" . $search_piece_num . "%'"; if (dol_strlen(trim($search_doc_ref))) { $sql .= " AND bk.doc_ref LIKE '%" . $search_doc_ref . "%'"; @@ -177,20 +210,20 @@ else { print_barre_liste($langs->trans("Bookkeeping"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num); /*print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; - print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; - print '<input type="hidden" name="action" value="delbookkeeping">'; - - print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey')); - - print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>'; - - print '</form>';*/ + print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; + print '<input type="hidden" name="action" value="delbookkeeping">'; + + print $formventilation->select_bookkeeping_importkey('importkey', GETPOST('importkey')); + + print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>'; + + print '</form>';*/ print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="delbookkeepingyear">'; - print $formother->select_year(GETPOST('delyear'),'delyear'); + print $formother->select_year(GETPOST('delyear'), 'delyear'); print '<div class="inline-block divButAction"><input type="submit" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>'; @@ -204,7 +237,7 @@ else { print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; - print_liste_field_titre($langs->trans("Doctype"), $_SERVER['PHP_SELF'], "bk.doc_type", "", "", "", $sortfield, $sortorder); + print_liste_field_titre($langs->trans("NumPiece"), $_SERVER['PHP_SELF'], "bk.piece_num", "", "", "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "bk.doc_date", "", "", "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "bk.doc_ref", "", "", "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder); @@ -215,12 +248,12 @@ else { print_liste_field_titre($langs->trans("Amount"), $_SERVER['PHP_SELF'], "bk.montant", "", "", 'align="center"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Sens"), $_SERVER['PHP_SELF'], "bk.sens", "", "", 'align="center"', $sortfield, $sortorder); print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "bk.code_journal", "", "", "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",$param,"",'width="60" align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder); print "</tr>\n"; print '<tr class="liste_titre">'; - print '<form action="'.$_SERVER["PHP_SELF"].'" method="GET">'; - print '<td><input type="text" name="search_doc_type" size="8" value="' . $search_doc_type . '"></td>'; + print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">'; + print '<td><input type="text" name="search_doc_type" size="8" value="' . $search_piece_num . '"></td>'; print '<td> </td>'; print '<td><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>'; print '<td><input type="text" name="search_account" size="8" value="' . $search_account . '"></td>'; @@ -232,9 +265,9 @@ else { print '<td> </td>'; print '<td><input type="text" name="search_journal" size="3" value="' . $search_journal . '"></td>'; print '<td align="right" colspan="2" class="liste_titre">'; - print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; + print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" name="button_search" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">'; print ' '; - print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; + print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" name="button_removefilter" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">'; print '</td>'; print '</form>'; print '</tr>'; @@ -247,7 +280,16 @@ else { print "<tr $bc[$var]>"; - print '<td>' . $obj->doc_type . '</td>'; + /* if ($old_piecenum!=$obj->piece_num) { + $total_debit=0; + $total_credit=0; + } else { + $total_debit+=$obj->debit; + $total_credit+=$obj->credit; + } + */ + + print '<td>' . $obj->piece_num . '</td>'; print '<td align="center">' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>'; print '<td>' . $obj->doc_ref . '</td>'; print '<td>' . length_accountg($obj->numero_compte) . '</td>'; @@ -260,19 +302,23 @@ else { print '<td>' . $obj->code_journal . '</td>'; print '<td align="center"><a href="./card.php?piece_num=' . $obj->piece_num . '">' . img_edit() . '</a></td>'; print "</tr>\n"; + + //$old_piecenum= $obj->piece_num; $i ++; } print "</table>"; - + print '<div class="tabsAction">'; - print '<a class="butAction" href="./card.php?action=create">'.$langs->trans("NewAccountingMvt").'</a>'; + print '<a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a>'; print '</div>'; - + $db->free($resql); } else { dol_print_error($db); } + + llxFooter(); } -llxFooter(); + $db->close(); \ No newline at end of file diff --git a/htdocs/accountancy/class/html.formventilation.class.php b/htdocs/accountancy/class/html.formventilation.class.php index f92f5b3ab88d106737e71724467dc40c1bcdff8e..5e838fb475fc1aeefa3c7107ea84fb4112125dd9 100644 --- a/htdocs/accountancy/class/html.formventilation.class.php +++ b/htdocs/accountancy/class/html.formventilation.class.php @@ -265,4 +265,81 @@ class FormVentilation extends Form $this->db->free($resql); return $out; } + + /** + * Return list of auxilary thirdparty accounts + * + * @param string $selectid Preselected pcg_type + * @param string $htmlname Name of field in html form + * @param int $showempty Add an empty field + * @param array $event Event options + * + * @return string String with HTML select + */ + function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $event = array()) { + global $conf; + + $out = ''; + + $aux_account = array (); + + // Auxiliary customer account + $sql = "SELECT DISTINCT code_compta, nom "; + $sql .= " FROM " . MAIN_DB_PREFIX . "societe"; + $sql .= " ORDER BY code_compta"; + dol_syslog(get_class($this) . "::select_auxaccount", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + while ( $obj = $this->db->fetch_object($resql) ) { + if (! empty($obj->code_compta)) { + $aux_account[$obj->code_compta] = $obj->code_compta . ' (' . $obj->nom . ')'; + } + } + } else { + $this->error = "Error " . $this->db->lasterror(); + dol_syslog(get_class($this) . "::select_pcgsubtype " . $this->error, LOG_ERR); + return - 1; + } + $this->db->free($resql); + + // Auxiliary supplier account + $sql = "SELECT DISTINCT code_compta_fournisseur, nom "; + $sql .= " FROM " . MAIN_DB_PREFIX . "societe"; + $sql .= " ORDER BY code_compta"; + dol_syslog(get_class($this) . "::select_auxaccount", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + while ( $obj = $this->db->fetch_object($resql) ) { + if (! empty($obj->code_compta_fournisseur)) { + $aux_account[$obj->code_compta_fournisseur] = $obj->code_compta_fournisseur . ' (' . $obj->nom . ')'; + } + } + } else { + $this->error = "Error " . $this->db->lasterror(); + dol_syslog(get_class($this) . "::select_pcgsubtype " . $this->error, LOG_ERR); + return - 1; + } + $this->db->free($resql); + + + //Build select + if (count($aux_account) > 0) { + + $out .= ajax_combobox($htmlname, $event); + + $out .= '<select id="' . $htmlname . '" class="flat" name="' . $htmlname . '">'; + if ($showempty) + $out .= '<option value="-1"></option>'; + foreach ( $aux_account as $key => $val ) { + if (($selectid != '') && $selectid == $key) { + $out .= '<option value="' . $key . '" selected>' . $val . '</option>'; + } else { + $out .= '<option value="' . $key . '">' . $val . '</option>'; + } + } + $out .= '</select>'; + } + + return $out; + } } diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 4361e730a2692d9a54851fb4f9a6c3af46b37c9e..7c025c8a893d92554f27dd45bde56b4f26a67b89 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -72,7 +72,7 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) { $offset = $limit * $page; if (! $sortfield) - $sortfield = "f.facnumber"; + $sortfield = "f.datef, f.facnumber, l.rowid"; if (! $sortorder) { if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) { diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 10dd38807a42ae0c4603f65ada6a0e7f6803c767..b33becb3f473e4fb7ade751f9d0520dd4513959c 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -355,7 +355,7 @@ if ($action == 'writebookkeeping') $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->doc_ref = $val["ref"]; - $bookkeeping->doc_type = 'banque'; + $bookkeeping->doc_type = 'bank'; $bookkeeping->fk_doc = $key; $bookkeeping->fk_docdet = $val["fk_bank"]; $bookkeeping->label_compte = $tabcompany[$key]['name']; @@ -675,6 +675,7 @@ else print "</table>"; + llxFooter(); } -llxFooter(); + $db->close(); diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index b603c1863bbad75ef3bee6bece04ed4d34c38820..2346df27c7738227d08b79a99d01bc46f7fa78eb 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com> * Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com> - * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> + * Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro> * * 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 @@ -487,7 +487,9 @@ if ($action == 'export_csv') } print "</table>"; - + + // End of page + llxFooter(); } -llxFooter(); + $db->close(); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 51f4766cc185ce48ca474e74385d2e08c478c0d9..b0ebc8e8df7abf79c1d9280fbaf688ff885e61fc 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -531,6 +531,7 @@ if ($action == 'export_csv') print "</table>"; + llxFooter(); } -llxFooter(); + $db->close(); diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index 9007ef5ad91575ff6bc4de0cb4ccfa8b64e27055..2cf3a323c219cdfe358570cd94062f02c1b22095 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -93,7 +93,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -107,7 +107,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index 849cbd9f4859ada5c0fda0405fbab3a1a8b08296..2d03c51e34dbf06185374e25564631067cbb39b7 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -89,7 +89,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel +/* Creation of an optional field /* */ /* ************************************************************************** */ @@ -103,7 +103,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index 7db9a8f2526648ca14b305848c46857698878d6d..d682f73ce6d77459dec47f1e5a2e169739a1cfd4 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -96,7 +96,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -110,7 +110,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index caddf621db5eb29ede74e47737b6f920d040ff5f..c4d45f08ded67be34a8d6149bc1a51d309f39cc9 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -96,7 +96,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -110,7 +110,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/livraison_extrafields.php index a236e4954cf7665a2f71cdc6dd7d049c7e1947ec..71a34039084a627fb7328be33ee3a0f34136c1f5 100644 --- a/htdocs/admin/livraison_extrafields.php +++ b/htdocs/admin/livraison_extrafields.php @@ -96,7 +96,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -110,7 +110,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/livraisondet_extrafields.php index ffa00ecf2be926fe2d748640a4379a8ded33fdf0..4679123352adf8eda71b880981e51cfc5089a753 100644 --- a/htdocs/admin/livraisondet_extrafields.php +++ b/htdocs/admin/livraisondet_extrafields.php @@ -96,7 +96,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -110,7 +110,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index ea0f99021cfeee6792c2db256a38057eda69e5a0..5d7358ae051f7ba6939c311109227b86616791d5 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -93,7 +93,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -107,7 +107,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 8a9f0e52c0abc54099228417438ecdf81ddd23d1..f966af78bf369a5cbfdbbb50254733fd8a180dfd 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -94,7 +94,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -108,7 +108,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 315a88788c258e3792a914a73ee4b6338a587d0e..701362e38f4a8ef8b208b5c7e8f9ec10f91604b3 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -97,7 +97,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -111,7 +111,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index 7e0f0f500fdc8ede48d3e29ffc081de23f9ca7ac..e741eb6cd75abe3dc88fb120cd137a98bf1e3327 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -97,7 +97,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -111,7 +111,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 4dbb8f5476062ef329aa800cf9a6474bc0d98460..00550995d19ac96ddae75ecabc859f2b9d7a0462 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -93,7 +93,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -107,7 +107,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 8518c77a8e41eae9555f7cfe1ef0e52c3c258226..f83ad1348fcd87819b881fff720013c438dca764 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -94,7 +94,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -108,7 +108,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index 87e907c696eef6c4fb373d0d86f7e40509b8f778..2bc9f20533441bedfa55ebdfc9896a819b295906 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -86,8 +86,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -100,7 +100,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index 9c55c606e81f3a776876116808d51416b52d83e4..784512d6d1e154c833534e1a4288edc4915b082c 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -87,8 +87,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -101,7 +101,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 97d4763ace3f7865ba9dee927d66fbc47451a23f..633c4fab581ac3435fbd277f532d82249a6fbe95 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -94,7 +94,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -108,7 +108,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index 627ff82ae41b226019d4328bdbdb7f2bba0d4546..ae545c695c3e70805cdce0302415951a135087c1 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -87,9 +87,9 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel -/* */ +/* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -101,9 +101,9 @@ if ($action == 'create') } /* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ +/* */ +/* Edition of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index 9711379f45801ee85afdeab1092bce66b2ca76ff..a5a86efaad98df2b5c8d011e7c9f71be11e70153 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -90,8 +90,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -104,7 +104,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index b843f83e1d0618a340caba88767f2e05a1b2c6b5..aad079d2b0eab8761d7d3b539655de5aafc5820f 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1034,7 +1034,7 @@ function price2numjs(amount) { print "var dec='" . $dec . "'; var thousand='" . $thousand . "';\n"; // Set var in javascript ?> - var main_max_dec_shown = <?php echo $conf->global->MAIN_MAX_DECIMALS_SHOWN; ?>; + var main_max_dec_shown = <?php echo str_replace('.', '', $conf->global->MAIN_MAX_DECIMALS_SHOWN); ?>; var main_rounding_unit = <?php echo $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>; var main_rounding_tot = <?php echo $conf->global->MAIN_MAX_DECIMALS_TOT; ?>; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index a04448b60d69b17991037cd500d26a6ebf40f59f..b22d9256c12b70f887554c5b98ace2a9ae1e7b9d 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -822,7 +822,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) { $langs->load("supplier"); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); // if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire); } } diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index 955b66f0bebcb84d2be370178219a27816bb405c..b7b809d277dc2f17c3cbb0d4e07fcdbfbadff00f 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -89,8 +89,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -103,7 +103,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index 80759ffe9d8e114daaaa38f430c665b75761a91b..ed7eb22c21dcc4d6a53979c66ac94eb263ded103 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -571,7 +571,7 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4108, 'Mitarbeitervorsorgekasse', 1,1,'TAXATMVK' ,'41'); insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (4109, 'Familienlastenausgleichsfond', 1,1,'TAXATFLAF' ,'41'); -ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(255) NOT NULL; +ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(300) NOT NULL; ALTER TABLE llx_holiday ADD COLUMN tms timestamp; ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL; diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index dca4b70a5d56a2c93b1001832e5d11e4e851554f..0f0c3d4ebf97dc5725a7370737136e3819a4ad3a 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_accounting_bookkeeping rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, doc_date date NOT NULL, doc_type varchar(30) NOT NULL, -- facture_client/reglement_client/facture_fournisseur/reglement_fournisseur - doc_ref varchar(255) 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_docdet integer NOT NULL, -- facture_client/reglement_client/... line rowid code_tiers varchar(24), -- code tiers diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index dad6b236d92da2bf3be8193f3172cdc8627d7b7e..d7db34b11052e31b4cd714ed1c2c6c6eacbad398 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -169,3 +169,5 @@ Param=Additionnal parameters EnabledProduct=In Product EnabledTiers=In Tiers EnabledVat=In Vat + +MvtNotCorrectlyBalanced=Mouvement not correctly balanced. Credit = %s. Debit = %s \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 890027c9d302db42d1d76e85551dc11fccfbd522..1c35968790cf9eaf9166009e70d4b92eed223a73 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -829,7 +829,7 @@ $bcnd=array(0=>'class="impair nodrag nodrop nohover"',1=>'class="pair nodrag nod // Define messages variables $mesg=''; $warning=''; $error=0; -// deprecated, see setEventMessage() and dol_htmloutput_events() +// deprecated, see setEventMessages() and dol_htmloutput_events() $mesgs=array(); $warnings=array(); $errors=array(); // Constants used to defined number of lines in textarea diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index 3c7cc30b7a3120b7ed06caa8398d75f2f8bdada3..d0e422768806f17e9ec1163a9174f86ec9b15c94 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -101,8 +101,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -115,7 +115,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index db450a09f6e4c24e64e30c8303565ea7243aba07..303180c2cb7a6bd6cbbda53d185df520ec6c7682 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -92,7 +92,7 @@ $sql.= ' AND cf.entity = ' . $conf->entity; if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) { $sql .= ' AND cf.fk_statut < 3'; } elseif ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) { - $sql .= ' AND cf.fk_statut < 6'; // We want alos status 5, we will keep them visible if dispatching is not yet finished (tested with function dolDispatchToDo). + $sql .= ' AND cf.fk_statut < 6'; // We want also status 5, we will keep them visible if dispatching is not yet finished (tested with function dolDispatchToDo). } else { $sql .= ' AND cf.fk_statut < 5'; } diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php index 39786f5ad71d25bbccbf4cb54279160096c69b8f..e3e070a347363d5f2d1eaa481ba56743117404e3 100644 --- a/htdocs/projet/admin/project_extrafields.php +++ b/htdocs/projet/admin/project_extrafields.php @@ -88,7 +88,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -102,7 +102,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/projet/admin/project_task_extrafields.php b/htdocs/projet/admin/project_task_extrafields.php index e9dc8be64e1fc62ea9433f8c0f8b346543b21966..3d6e1d78fe8e8c2b18e067349f7e26ca9f64ff28 100644 --- a/htdocs/projet/admin/project_task_extrafields.php +++ b/htdocs/projet/admin/project_task_extrafields.php @@ -87,7 +87,7 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ @@ -101,7 +101,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php index 56bf58cf61d6268f2e6abb324c118beffd3eee2f..37db7d02e4c8214983a418f4f7324e4c56f76179 100644 --- a/htdocs/societe/admin/contact_extrafields.php +++ b/htdocs/societe/admin/contact_extrafields.php @@ -88,8 +88,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -102,7 +102,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php index a7589566175329495dde568c97a18092e8e7c017..ceb86d102bdf5fc576315e3a4bcd68bf04ee9072 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php @@ -121,8 +121,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -135,7 +135,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php index 2301f1092820413bdbcc4f4836a3fbaf9cec6ef7..99eab0e3a882c67084edcdb33bccb62959f123a0 100644 --- a/htdocs/user/admin/group_extrafields.php +++ b/htdocs/user/admin/group_extrafields.php @@ -89,8 +89,8 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') @@ -103,7 +103,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) diff --git a/htdocs/webservices/admin/index.php b/htdocs/webservices/admin/index.php index f75c60c6c45d26bc4ee62234371eb3cdbac80abf..5d21c97ce5fa6641b827a9ed0016e72d0e3a9259 100644 --- a/htdocs/webservices/admin/index.php +++ b/htdocs/webservices/admin/index.php @@ -46,12 +46,12 @@ if ($actionsave) if ($i >= 1) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } }