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);
|
||||
$result = $acline->fetch($rowid);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -334,11 +334,12 @@ if ($result) {
|
||||
// Bank account
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Account").'</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 $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 '</tr>';
|
||||
|
||||
@ -105,6 +105,7 @@ WrongSupplierCode=Vendor code invalid
|
||||
CustomerCodeModel=Customer code model
|
||||
SupplierCodeModel=Vendor code model
|
||||
Gencod=Barcode
|
||||
GencodBuyPrice=Barcode of price ref
|
||||
##### Professional ID #####
|
||||
ProfId1Short=Prof. id 1
|
||||
ProfId2Short=Prof. id 2
|
||||
|
||||
@ -515,10 +515,13 @@ $trackid = 'xxxx'.$object->id;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
if ($search_all) {
|
||||
$setupstring = '';
|
||||
foreach ($fieldstosearchall as $key => $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 = '';
|
||||
|
||||
@ -183,7 +183,7 @@ if (!empty($conf->barcode->enabled)) {
|
||||
$fieldstosearchall['p.barcode'] = 'Gencod';
|
||||
$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)) {
|
||||
$fieldstosearchall = dolExplodeIntoArray($conf->global->PRODUCT_QUICKSEARCH_ON_FIELDS);
|
||||
}
|
||||
@ -807,10 +807,13 @@ if ($resql) {
|
||||
}
|
||||
|
||||
if ($sall) {
|
||||
$setupstring = '';
|
||||
foreach ($fieldstosearchall as $key => $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
|
||||
|
||||
@ -350,8 +350,10 @@ if (empty($reshook)) {
|
||||
}
|
||||
$qty = "qtyl".$i;
|
||||
$comment = "comment".$i;
|
||||
$eatby = "dlc".$i;
|
||||
$sellby = "dluo".$i;
|
||||
// EATBY <-> DLUO see productbatch.class.php
|
||||
// SELLBY <-> DLC
|
||||
$eatby = "dluo".$i;
|
||||
$sellby = "dlc".$i;
|
||||
$batch = "batch".$i;
|
||||
$cost_price = "cost_price".$i;
|
||||
|
||||
@ -626,9 +628,11 @@ if (empty($reshook)) {
|
||||
$batch = "batch".$line_id;
|
||||
$dlc = "dlc".$line_id;
|
||||
$dluo = "dluo".$line_id;
|
||||
$eatby = GETPOST($dlc, 'alpha');
|
||||
// EATBY <-> DLUO
|
||||
$eatby = GETPOST($dluo, 'alpha');
|
||||
$eatbydate = str_replace('/', '-', $eatby);
|
||||
$sellby = GETPOST($dluo, 'alpha');
|
||||
// SELLBY <-> DLC
|
||||
$sellby = GETPOST($dlc, 'alpha');
|
||||
$sellbydate = str_replace('/', '-', $sellby);
|
||||
$line->batch = GETPOST($batch, 'alpha');
|
||||
$line->eatby = strtotime($eatbydate);
|
||||
@ -639,8 +643,7 @@ if (empty($reshook)) {
|
||||
setEventMessages($line->error, $line->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
} else // Product no predefined
|
||||
{
|
||||
} else { // Product no predefined
|
||||
$qty = "qtyl".$line_id;
|
||||
$line->id = $line_id;
|
||||
$line->qty = GETPOST($qty, 'int');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user