Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/compta/bank/line.php
This commit is contained in:
commit
4cc1f67632
@ -127,7 +127,7 @@ if ($user->rights->banque->modifier && $action == "update") {
|
|||||||
$acline = new AccountLine($db);
|
$acline = new AccountLine($db);
|
||||||
$result = $acline->fetch($rowid);
|
$result = $acline->fetch($rowid);
|
||||||
if ($result <= 0) {
|
if ($result <= 0) {
|
||||||
dol_syslog('Failed to read bank line with id '.$rowid, LOG_ERR); // This happens due to old bug that has set fk_account to null.
|
dol_syslog('Failed to read bank line with id '.$rowid, LOG_WARNING); // This happens due to old bug that has set fk_account to null.
|
||||||
$acline->id = $rowid;
|
$acline->id = $rowid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,11 +334,12 @@ if ($result) {
|
|||||||
// Bank account
|
// Bank account
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Account").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("Account").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (!$objp->rappro && !$bankline->getVentilExportCompta()) {
|
// $objp->fk_account may be not > 0 if data was lost by an old bug. In such a case, we let a chance to user to fix it.
|
||||||
|
if (($objp->rappro || $bankline->getVentilExportCompta()) && $objp->fk_account > 0) {
|
||||||
|
print $acct->getNomUrl(1, 'transactions', 'reflabel');
|
||||||
|
} else {
|
||||||
print img_picto('', 'bank_account', 'class="paddingright"');
|
print img_picto('', 'bank_account', 'class="paddingright"');
|
||||||
print $form->select_comptes($acct->id, 'accountid', 0, '', ($acct->id > 0 ? $acct->id : 1), '', 0, '', 1);
|
print $form->select_comptes($acct->id, 'accountid', 0, '', ($acct->id > 0 ? $acct->id : 1), '', 0, '', 1);
|
||||||
} else {
|
|
||||||
print $acct->getNomUrl(1, 'transactions', 'reflabel');
|
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -105,6 +105,7 @@ WrongSupplierCode=Vendor code invalid
|
|||||||
CustomerCodeModel=Customer code model
|
CustomerCodeModel=Customer code model
|
||||||
SupplierCodeModel=Vendor code model
|
SupplierCodeModel=Vendor code model
|
||||||
Gencod=Barcode
|
Gencod=Barcode
|
||||||
|
GencodBuyPrice=Barcode of price ref
|
||||||
##### Professional ID #####
|
##### Professional ID #####
|
||||||
ProfId1Short=Prof. id 1
|
ProfId1Short=Prof. id 1
|
||||||
ProfId2Short=Prof. id 2
|
ProfId2Short=Prof. id 2
|
||||||
|
|||||||
@ -515,10 +515,13 @@ $trackid = 'xxxx'.$object->id;
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||||
|
|
||||||
if ($search_all) {
|
if ($search_all) {
|
||||||
|
$setupstring = '';
|
||||||
foreach ($fieldstosearchall as $key => $val) {
|
foreach ($fieldstosearchall as $key => $val) {
|
||||||
$fieldstosearchall[$key] = $langs->trans($val);
|
$fieldstosearchall[$key] = $langs->trans($val);
|
||||||
|
$setupstring .= $key."=".$val.";";
|
||||||
}
|
}
|
||||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
|
print '<!-- Search done like if PRODUCT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
|
||||||
|
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|||||||
@ -183,7 +183,7 @@ if (!empty($conf->barcode->enabled)) {
|
|||||||
$fieldstosearchall['p.barcode'] = 'Gencod';
|
$fieldstosearchall['p.barcode'] = 'Gencod';
|
||||||
$fieldstosearchall['pfp.barcode'] = 'GencodBuyPrice';
|
$fieldstosearchall['pfp.barcode'] = 'GencodBuyPrice';
|
||||||
}
|
}
|
||||||
// Personalized search criterias. Example: $conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS = 'p.ref=ProductRef;p.label=ProductLabel'
|
// Personalized search criterias. Example: $conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS = 'p.ref=ProductRef;p.label=ProductLabel;p.description=Description;p.note=Note;'
|
||||||
if (!empty($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS)) {
|
if (!empty($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS)) {
|
||||||
$fieldstosearchall = dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS);
|
$fieldstosearchall = dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS);
|
||||||
}
|
}
|
||||||
@ -807,10 +807,13 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($sall) {
|
if ($sall) {
|
||||||
|
$setupstring = '';
|
||||||
foreach ($fieldstosearchall as $key => $val) {
|
foreach ($fieldstosearchall as $key => $val) {
|
||||||
$fieldstosearchall[$key] = $langs->trans($val);
|
$fieldstosearchall[$key] = $langs->trans($val);
|
||||||
|
$setupstring .= $key."=".$val.";";
|
||||||
}
|
}
|
||||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>';
|
print '<!-- Search done like if PRODUCT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
|
||||||
|
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'</div>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
|
|||||||
@ -350,8 +350,10 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
$qty = "qtyl".$i;
|
$qty = "qtyl".$i;
|
||||||
$comment = "comment".$i;
|
$comment = "comment".$i;
|
||||||
$eatby = "dlc".$i;
|
// EATBY <-> DLUO see productbatch.class.php
|
||||||
$sellby = "dluo".$i;
|
// SELLBY <-> DLC
|
||||||
|
$eatby = "dluo".$i;
|
||||||
|
$sellby = "dlc".$i;
|
||||||
$batch = "batch".$i;
|
$batch = "batch".$i;
|
||||||
$cost_price = "cost_price".$i;
|
$cost_price = "cost_price".$i;
|
||||||
|
|
||||||
@ -626,9 +628,11 @@ if (empty($reshook)) {
|
|||||||
$batch = "batch".$line_id;
|
$batch = "batch".$line_id;
|
||||||
$dlc = "dlc".$line_id;
|
$dlc = "dlc".$line_id;
|
||||||
$dluo = "dluo".$line_id;
|
$dluo = "dluo".$line_id;
|
||||||
$eatby = GETPOST($dlc, 'alpha');
|
// EATBY <-> DLUO
|
||||||
|
$eatby = GETPOST($dluo, 'alpha');
|
||||||
$eatbydate = str_replace('/', '-', $eatby);
|
$eatbydate = str_replace('/', '-', $eatby);
|
||||||
$sellby = GETPOST($dluo, 'alpha');
|
// SELLBY <-> DLC
|
||||||
|
$sellby = GETPOST($dlc, 'alpha');
|
||||||
$sellbydate = str_replace('/', '-', $sellby);
|
$sellbydate = str_replace('/', '-', $sellby);
|
||||||
$line->batch = GETPOST($batch, 'alpha');
|
$line->batch = GETPOST($batch, 'alpha');
|
||||||
$line->eatby = strtotime($eatbydate);
|
$line->eatby = strtotime($eatbydate);
|
||||||
@ -639,8 +643,7 @@ if (empty($reshook)) {
|
|||||||
setEventMessages($line->error, $line->errors, 'errors');
|
setEventMessages($line->error, $line->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
} else // Product no predefined
|
} else { // Product no predefined
|
||||||
{
|
|
||||||
$qty = "qtyl".$line_id;
|
$qty = "qtyl".$line_id;
|
||||||
$line->id = $line_id;
|
$line->id = $line_id;
|
||||||
$line->qty = GETPOST($qty, 'int');
|
$line->qty = GETPOST($qty, 'int');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user