Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
Conflicts: htdocs/api/class/api.class.php htdocs/compta/facture/card.php htdocs/reception/list.php
This commit is contained in:
commit
dfba29b3c6
@ -765,8 +765,8 @@ if (empty($reshook)) {
|
||||
|
||||
// Define special_code for special lines
|
||||
$special_code = GETPOST('special_code', 'int');
|
||||
if (!GETPOST('qty', 'alpha')) {
|
||||
$special_code = 3;
|
||||
if ($special_code == 3) {
|
||||
$special_code = 0; // Options should not exists on invoices
|
||||
}
|
||||
|
||||
/*$line = new FactureLigne($db);
|
||||
|
||||
@ -2388,9 +2388,9 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Define special_code for special lines
|
||||
$special_code = GETPOST('special_code');
|
||||
if (!GETPOST('qty')) {
|
||||
$special_code = 3;
|
||||
$special_code = GETPOST('special_code', 'int');
|
||||
if ($special_code == 3) {
|
||||
$special_code = 0; // Options should not exists on invoices
|
||||
}
|
||||
|
||||
$line = new FactureLigne($db);
|
||||
@ -2916,6 +2916,9 @@ if ($action == 'create') {
|
||||
if (empty($mode_reglement_id)) {
|
||||
$mode_reglement_id = $soc->mode_reglement_id;
|
||||
}
|
||||
if (empty($fk_account)) {
|
||||
$fk_account = $soc->fk_account;
|
||||
}
|
||||
if (!$remise_percent) {
|
||||
$remise_percent = $soc->remise_percent;
|
||||
}
|
||||
@ -3023,6 +3026,9 @@ if ($action == 'create') {
|
||||
$mode_reglement_id = GETPOST("mode_reglement_id", 'int');
|
||||
}
|
||||
|
||||
// when bank account is empty (means not override by payment mode form a other object, like third-party), try to use default value
|
||||
$fk_account = GETPOSTISSET("fk_account") ? GETPOST("fk_account", 'int') : $fk_account;
|
||||
|
||||
if (!empty($soc->id)) {
|
||||
$absolute_discount = $soc->getAvailableDiscounts();
|
||||
}
|
||||
@ -3625,8 +3631,8 @@ if ($action == 'create') {
|
||||
// Bank Account
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
||||
$fk_account = GETPOSTISSET('fk_account') ? GETPOST('fk_account', 'int') : $fk_account;
|
||||
print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes(($fk_account < 0 ? '' : $fk_account), 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
|
||||
print img_picto('', 'bank_account', 'class="pictofixedwidth"');
|
||||
print $form->select_comptes(($fk_account < 0 ? '' : $fk_account), 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -10684,6 +10684,9 @@ function dolForgeCriteriaCallback($matches)
|
||||
$operand = preg_replace('/[^a-z0-9\._]/i', '', trim($tmp[0]));
|
||||
|
||||
$operator = strtoupper(preg_replace('/[^a-z<>=]/i', '', trim($tmp[1])));
|
||||
if ($operator == 'NOTLIKE') {
|
||||
$operator = 'NOT LIKE';
|
||||
}
|
||||
|
||||
$tmpescaped = trim($tmp[2]);
|
||||
$regbis = array();
|
||||
|
||||
@ -18,15 +18,14 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table
|
||||
if (empty($extrafieldsobjectprefix)) {
|
||||
$extrafieldsobjectprefix = 'ef.';
|
||||
}
|
||||
|
||||
foreach ($extrafields->attributes[$extrafieldsobjectkey]['label'] as $key => $val) {
|
||||
if (!empty($extrafields->attributes[$extrafieldsobjectkey]['list'][$key])) {
|
||||
$arrayfields[$extrafieldsobjectprefix.$key] = array(
|
||||
'label' => $extrafields->attributes[$extrafieldsobjectkey]['label'][$key],
|
||||
'type' => $extrafields->attributes[$extrafieldsobjectkey]['type'][$key],
|
||||
'checked' => (($extrafields->attributes[$extrafieldsobjectkey]['list'][$key] < 0) ? 0 : 1),
|
||||
'checked' => ((dol_eval($extrafields->attributes[$extrafieldsobjectkey]['list'][$key], 1) <= 0) ? 0 : 1),
|
||||
'position' => $extrafields->attributes[$extrafieldsobjectkey]['pos'][$key],
|
||||
'enabled' => (abs((int) $extrafields->attributes[$extrafieldsobjectkey]['list'][$key]) != 3 && $extrafields->attributes[$extrafieldsobjectkey]['perms'][$key]),
|
||||
'enabled' => (abs((int) $extrafields->attributes[$extrafieldsobjectkey]['list'][$key]) != 3 && dol_eval($extrafields->attributes[$extrafieldsobjectkey]['perms'][$key], 1)),
|
||||
'langfile' => $extrafields->attributes[$extrafieldsobjectkey]['langfile'][$key],
|
||||
'help' => $extrafields->attributes[$extrafieldsobjectkey]['help'][$key],
|
||||
);
|
||||
|
||||
@ -491,12 +491,10 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target";
|
||||
if (empty($user->rights->societe->client->voir) && !$socid) { // Internal user with no permission to see all
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
|
||||
// Add joins from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " WHERE e.entity IN (".getEntity('reception').")";
|
||||
if (empty($user->rights->societe->client->voir) && !$socid) { // Internal user with no permission to see all
|
||||
$sql .= " AND e.fk_soc = sc.fk_soc";
|
||||
@ -983,6 +981,9 @@ while ($i < min($num, $limit)) {
|
||||
{
|
||||
}*/
|
||||
print "</td>\n";
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($arrayfields['l.ref']['checked']) || !empty($arrayfields['l.date_delivery']['checked'])) {
|
||||
@ -1078,6 +1079,13 @@ if ($num == 0) {
|
||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
// Show total line
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||
|
||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print "</table>";
|
||||
print "</div>";
|
||||
print '</form>';
|
||||
|
||||
@ -239,7 +239,7 @@ if (empty($modulepart)) {
|
||||
accessforbidden('Bad value for parameter modulepart', 0, 0, 1);
|
||||
}
|
||||
|
||||
$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $refname);
|
||||
$check_access = dol_check_secure_access_document($modulepart, $original_file, $entity, $user, $refname);
|
||||
$accessallowed = $check_access['accessallowed'];
|
||||
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
|
||||
$fullpath_original_file = $check_access['original_file']; // $fullpath_original_file is now a full path name
|
||||
|
||||
Loading…
Reference in New Issue
Block a user