Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
a9b52f36e6
@ -27,6 +27,7 @@ require '../../main.inc.php';
|
|||||||
|
|
||||||
// Class
|
// Class
|
||||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||||
|
|
||||||
// Langs
|
// Langs
|
||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
@ -41,12 +42,24 @@ $piece_num = GETPOST("piece_num");
|
|||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|
||||||
$numero_compte = GETPOST('numero_compte');
|
$account_number = GETPOST('account_number');
|
||||||
$code_tiers = GETPOST('code_tiers');
|
$code_tiers = GETPOST('code_tiers');
|
||||||
|
if ($code_tiers==-1) {
|
||||||
|
$code_tiers=null;
|
||||||
|
}
|
||||||
$label_compte = GETPOST('label_compte');
|
$label_compte = GETPOST('label_compte');
|
||||||
$debit = price2num(GETPOST('debit'));
|
$debit = price2num(GETPOST('debit'));
|
||||||
$credit = price2num(GETPOST('credit'));
|
$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") {
|
if ($action == "confirm_update") {
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
@ -63,7 +76,7 @@ if ($action == "confirm_update") {
|
|||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($book->error, $book->errors, 'errors');
|
setEventMessages($book->error, $book->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$book->numero_compte = $numero_compte;
|
$book->numero_compte = $account_number;
|
||||||
$book->code_tiers = $code_tiers;
|
$book->code_tiers = $code_tiers;
|
||||||
$book->label_compte = $label_compte;
|
$book->label_compte = $label_compte;
|
||||||
$book->debit = $debit;
|
$book->debit = $debit;
|
||||||
@ -92,7 +105,7 @@ if ($action == "confirm_update") {
|
|||||||
else if ($action == "add") {
|
else if ($action == "add") {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if ((intval($debit) != 0) && (intval($credit) != 0)) {
|
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
|
||||||
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
@ -100,7 +113,7 @@ else if ($action == "add") {
|
|||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
$book = new BookKeeping($db);
|
$book = new BookKeeping($db);
|
||||||
|
|
||||||
$book->numero_compte = $numero_compte;
|
$book->numero_compte = $account_number;
|
||||||
$book->code_tiers = $code_tiers;
|
$book->code_tiers = $code_tiers;
|
||||||
$book->label_compte = $label_compte;
|
$book->label_compte = $label_compte;
|
||||||
$book->debit = $debit;
|
$book->debit = $debit;
|
||||||
@ -113,11 +126,12 @@ else if ($action == "add") {
|
|||||||
$book->fk_doc = GETPOST('fk_doc');
|
$book->fk_doc = GETPOST('fk_doc');
|
||||||
$book->fk_docdet = GETPOST('fk_docdet');
|
$book->fk_docdet = GETPOST('fk_docdet');
|
||||||
|
|
||||||
if (! empty($debit)) {
|
if (floatval($debit) != 0.0) {
|
||||||
$book->montant = $debit;
|
$book->montant = $debit;
|
||||||
$book->sens = 'D';
|
$book->sens = 'D';
|
||||||
}
|
}
|
||||||
if (! empty($credit)) {
|
|
||||||
|
if (floatval($credit) != 0.0) {
|
||||||
$book->montant = $credit;
|
$book->montant = $credit;
|
||||||
$book->sens = 'C';
|
$book->sens = 'C';
|
||||||
}
|
}
|
||||||
@ -179,6 +193,7 @@ else if ($action == "confirm_create") {
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
$formventilation = new FormVentilation($db);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation to delete the command
|
* Confirmation to delete the command
|
||||||
@ -281,9 +296,21 @@ if ($action == 'create') {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ListeMvts"));
|
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%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
if (count($book->linesmvt) > 0) {
|
if (count($book->linesmvt) > 0) {
|
||||||
|
|
||||||
|
$total_debit=0;
|
||||||
|
$total_credit=0;
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
print_liste_field_titre($langs->trans("Numerocompte"));
|
print_liste_field_titre($langs->trans("Numerocompte"));
|
||||||
@ -301,21 +328,26 @@ if ($action == 'create') {
|
|||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
|
$total_debit+=$line->debit;
|
||||||
|
$total_credit+=$line->credit;
|
||||||
|
|
||||||
if ($action == 'update' && $line->id == $id) {
|
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 '<td>';
|
||||||
print '<input type="hidden" name="action" value="confirm_update">' . "\n";
|
print $formventilation->select_account($line->numero_compte, 'account_number', 0, array (), 1, 1,'');
|
||||||
print '<td><input type="text" size="6" name="numero_compte" value="' . $line->numero_compte . '"/></td>';
|
print '</td>';
|
||||||
print '<td><input type="text" size="15" name="code_tiers" value="' . $line->code_tiers . '"/></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="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="debit" value="' . price($line->debit) . '"/></td>';
|
||||||
print '<td><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>';
|
print '<td><input type="text" size="6" name="credit" value="' . price($line->credit) . '"/></td>';
|
||||||
print '<td>' . $line->montant . '</td>';
|
print '<td>' . $line->montant . '</td>';
|
||||||
print '<td>' . $line->sens . '</td>';
|
print '<td>' . $line->sens . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="submit" class="button" value="' . $langs->trans("Update") . '">';
|
print '<input type="hidden" name="id" value="' . $line->id . '">' . "\n";
|
||||||
print '</form>';
|
print '<input type="submit" class="button" name="update" value="' . $langs->trans("Update") . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td>' . $line->numero_compte . '</td>';
|
print '<td>' . $line->numero_compte . '</td>';
|
||||||
@ -327,10 +359,10 @@ if ($action == 'create') {
|
|||||||
print '<td>' . $line->sens . '</td>';
|
print '<td>' . $line->sens . '</td>';
|
||||||
|
|
||||||
print '<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 img_edit();
|
||||||
print '</a> ';
|
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 img_delete();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|
||||||
@ -339,34 +371,32 @@ if ($action == 'create') {
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($total_debit!=$total_credit) {
|
||||||
|
setEventMessages(null, array('MvtNotCorrectlyBalanced',$total_credit,$total_debit),'errors');
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == "" || $action == 'add') {
|
if ($action == "" || $action == 'add') {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
print '<td>';
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '" method="post">';
|
print $formventilation->select_account($account_number, 'account_number', 0, array (), 1, 1, '');
|
||||||
print '<input type="hidden" name="action" value="add">' . "\n";
|
print '</td>';
|
||||||
print '<input type="hidden" name="doc_date" value="' . $book->doc_date . '">' . "\n";
|
print '<td>';
|
||||||
print '<input type="hidden" name="doc_type" value="' . $book->doc_type . '">' . "\n";
|
print $formventilation->select_auxaccount($code_tiers, 'code_tiers',1);
|
||||||
print '<input type="hidden" name="doc_ref" value="' . $book->doc_ref . '">' . "\n";
|
print '</td>';
|
||||||
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><input type="text" size="15" name="label_compte" value="' . $label_compte . '"/></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="debit" value="' . price($debit) . '"/></td>';
|
||||||
print '<td><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
|
print '<td><input type="text" size="6" name="credit" value="' . price($credit) . '"/></td>';
|
||||||
print '<td></td>';
|
print '<td></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 '</tr>';
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
print load_fiche_titre($langs->trans("NoRecords"));
|
print load_fiche_titre($langs->trans("NoRecords"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,6 @@
|
|||||||
* \ingroup Accounting Expert
|
* \ingroup Accounting Expert
|
||||||
* \brief List operation of book keeping
|
* \brief List operation of book keeping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
// Class
|
// Class
|
||||||
@ -58,7 +57,7 @@ $formother = new FormOther($db);
|
|||||||
|
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_doc_type="";
|
$search_piece_num = "";
|
||||||
$search_doc_ref = "";
|
$search_doc_ref = "";
|
||||||
$search_account = "";
|
$search_account = "";
|
||||||
$search_thirdparty = "";
|
$search_thirdparty = "";
|
||||||
@ -80,8 +79,7 @@ if ($action == 'delbookkeeping') {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'delbookkeepingyear') {
|
||||||
elseif ($action == 'delbookkeepingyear') {
|
|
||||||
|
|
||||||
$delyear = GETPOST('delyear', 'int');
|
$delyear = GETPOST('delyear', 'int');
|
||||||
|
|
||||||
@ -93,8 +91,7 @@ elseif ($action == 'delbookkeepingyear') {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($action == 'delbookkeepingyear') {
|
||||||
elseif ($action == 'delbookkeepingyear') {
|
|
||||||
|
|
||||||
$delyear = GETPOST('delyear', 'int');
|
$delyear = GETPOST('delyear', 'int');
|
||||||
|
|
||||||
@ -118,6 +115,24 @@ else if ($action == 'export_csv') {
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 ) {
|
foreach ( $object->linesexport as $line ) {
|
||||||
print $line->id . ',';
|
print $line->id . ',';
|
||||||
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
|
print '"' . dol_print_date($line->doc_date, '%d%m%Y') . '",';
|
||||||
@ -133,6 +148,24 @@ else if ($action == 'export_csv') {
|
|||||||
print "\n";
|
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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@ -147,7 +180,7 @@ else {
|
|||||||
|
|
||||||
if (dol_strlen(trim($search_doc_type))) {
|
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))) {
|
if (dol_strlen(trim($search_doc_ref))) {
|
||||||
$sql .= " AND bk.doc_ref LIKE '%" . $search_doc_ref . "%'";
|
$sql .= " AND bk.doc_ref LIKE '%" . $search_doc_ref . "%'";
|
||||||
@ -204,7 +237,7 @@ else {
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
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("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("Docref"), $_SERVER['PHP_SELF'], "bk.doc_ref", "", "", "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Numerocompte"), $_SERVER['PHP_SELF'], "bk.numero_compte", "", "", "", $sortfield, $sortorder);
|
||||||
@ -220,7 +253,7 @@ else {
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
|
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 '<td><input type="text" name="search_doc_type" size="8" value="' . $search_piece_num . '"></td>';
|
||||||
print '<td> </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_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
|
||||||
print '<td><input type="text" name="search_account" size="8" value="' . $search_account . '"></td>';
|
print '<td><input type="text" name="search_account" size="8" value="' . $search_account . '"></td>';
|
||||||
@ -247,7 +280,16 @@ else {
|
|||||||
|
|
||||||
print "<tr $bc[$var]>";
|
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 align="center">' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>';
|
||||||
print '<td>' . $obj->doc_ref . '</td>';
|
print '<td>' . $obj->doc_ref . '</td>';
|
||||||
print '<td>' . length_accountg($obj->numero_compte) . '</td>';
|
print '<td>' . length_accountg($obj->numero_compte) . '</td>';
|
||||||
@ -260,6 +302,8 @@ else {
|
|||||||
print '<td>' . $obj->code_journal . '</td>';
|
print '<td>' . $obj->code_journal . '</td>';
|
||||||
print '<td align="center"><a href="./card.php?piece_num=' . $obj->piece_num . '">' . img_edit() . '</a></td>';
|
print '<td align="center"><a href="./card.php?piece_num=' . $obj->piece_num . '">' . img_edit() . '</a></td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
//$old_piecenum= $obj->piece_num;
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
@ -272,7 +316,9 @@ else {
|
|||||||
} else {
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
@ -265,4 +265,81 @@ class FormVentilation extends Form
|
|||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return $out;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,7 +72,7 @@ if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) {
|
|||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
|
|
||||||
if (! $sortfield)
|
if (! $sortfield)
|
||||||
$sortfield = "f.facnumber";
|
$sortfield = "f.datef, f.facnumber, l.rowid";
|
||||||
|
|
||||||
if (! $sortorder) {
|
if (! $sortorder) {
|
||||||
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
|
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
|
||||||
|
|||||||
@ -355,7 +355,7 @@ if ($action == 'writebookkeeping')
|
|||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
$bookkeeping->doc_ref = $val["ref"];
|
$bookkeeping->doc_ref = $val["ref"];
|
||||||
$bookkeeping->doc_type = 'banque';
|
$bookkeeping->doc_type = 'bank';
|
||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
$bookkeeping->fk_docdet = $val["fk_bank"];
|
$bookkeeping->fk_docdet = $val["fk_bank"];
|
||||||
$bookkeeping->label_compte = $tabcompany[$key]['name'];
|
$bookkeeping->label_compte = $tabcompany[$key]['name'];
|
||||||
@ -675,6 +675,7 @@ else
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
}
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -488,6 +488,8 @@ if ($action == 'export_csv')
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
}
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -531,6 +531,7 @@ if ($action == 'export_csv')
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
}
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -86,7 +86,7 @@ if ($action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Creation d'un champ optionnel
|
/* Creation of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Edition d'un champ optionnel */
|
/* Edition of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($action == 'edit' && ! empty($attrname))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -90,7 +90,7 @@ if ($action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Creation d'un champ optionnel
|
/* Creation of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Edition d'un champ optionnel */
|
/* Edition of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($action == 'edit' && ! empty($attrname))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -1034,7 +1034,7 @@ function price2numjs(amount) {
|
|||||||
print "var dec='" . $dec . "'; var thousand='" . $thousand . "';\n"; // Set var in javascript
|
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_unit = <?php echo $conf->global->MAIN_MAX_DECIMALS_UNIT; ?>;
|
||||||
var main_rounding_tot = <?php echo $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
|
var main_rounding_tot = <?php echo $conf->global->MAIN_MAX_DECIMALS_TOT; ?>;
|
||||||
|
|
||||||
|
|||||||
@ -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))
|
if (! empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE))
|
||||||
{
|
{
|
||||||
$langs->load("supplier");
|
$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);
|
// if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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 (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');
|
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 tms timestamp;
|
||||||
ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
||||||
|
|||||||
@ -22,7 +22,7 @@ CREATE TABLE llx_accounting_bookkeeping
|
|||||||
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
doc_date date NOT NULL,
|
doc_date date NOT NULL,
|
||||||
doc_type varchar(30) NOT NULL, -- facture_client/reglement_client/facture_fournisseur/reglement_fournisseur
|
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_doc integer NOT NULL, -- facture_client/reglement_client/... rowid
|
||||||
fk_docdet integer NOT NULL, -- facture_client/reglement_client/... line rowid
|
fk_docdet integer NOT NULL, -- facture_client/reglement_client/... line rowid
|
||||||
code_tiers varchar(24), -- code tiers
|
code_tiers varchar(24), -- code tiers
|
||||||
|
|||||||
@ -169,3 +169,5 @@ Param=Additionnal parameters
|
|||||||
EnabledProduct=In Product
|
EnabledProduct=In Product
|
||||||
EnabledTiers=In Tiers
|
EnabledTiers=In Tiers
|
||||||
EnabledVat=In Vat
|
EnabledVat=In Vat
|
||||||
|
|
||||||
|
MvtNotCorrectlyBalanced=Mouvement not correctly balanced. Credit = %s. Debit = %s
|
||||||
@ -829,7 +829,7 @@ $bcnd=array(0=>'class="impair nodrag nodrop nohover"',1=>'class="pair nodrag nod
|
|||||||
|
|
||||||
// Define messages variables
|
// Define messages variables
|
||||||
$mesg=''; $warning=''; $error=0;
|
$mesg=''; $warning=''; $error=0;
|
||||||
// deprecated, see setEventMessage() and dol_htmloutput_events()
|
// deprecated, see setEventMessages() and dol_htmloutput_events()
|
||||||
$mesgs=array(); $warnings=array(); $errors=array();
|
$mesgs=array(); $warnings=array(); $errors=array();
|
||||||
|
|
||||||
// Constants used to defined number of lines in textarea
|
// Constants used to defined number of lines in textarea
|
||||||
|
|||||||
@ -101,7 +101,7 @@ if ($action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Creation d'un champ optionnel
|
/* Creation of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Edition d'un champ optionnel */
|
/* Edition of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($action == 'edit' && ! empty($attrname))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -92,7 +92,7 @@ $sql.= ' AND cf.entity = ' . $conf->entity;
|
|||||||
if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) {
|
if ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) {
|
||||||
$sql .= ' AND cf.fk_statut < 3';
|
$sql .= ' AND cf.fk_statut < 3';
|
||||||
} elseif ($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER) {
|
} 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 {
|
} else {
|
||||||
$sql .= ' AND cf.fk_statut < 5';
|
$sql .= ' AND cf.fk_statut < 5';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -121,7 +121,7 @@ if ($action != 'create' && $action != 'edit')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Creation d'un champ optionnel
|
/* Creation of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Edition d'un champ optionnel */
|
/* Edition of an optional field */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
if ($action == 'edit' && ! empty($attrname))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -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))
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
|||||||
@ -46,12 +46,12 @@ if ($actionsave)
|
|||||||
if ($i >= 1)
|
if ($i >= 1)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessage($langs->trans("SetupSaved"));
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
setEventMessage($langs->trans("Error"), 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user