diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index ce16ba2db88..52c16a8ce4b 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -903,10 +903,6 @@ if ($rowid > 0) { print "\n"; print ''; print ''; - - if ($num > $limit) { - print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); - } } else { dol_print_error($db); } diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 91d556c2822..3ada37889db 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -515,6 +515,7 @@ if (empty($reshook)) { } else { $lineid = 0; $error++; + $errors[] = $objecttmp->error; break; } // Defined the new fk_parent_line diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 460b6407789..db307cc91a9 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -752,7 +752,7 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'\.pdf$'; } foreach ($listofobjectref as $tmppdf) { - $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\']+\.pdf$'; // To include PDF generated from ODX files + $arrayofinclusion[] = '^'.preg_quote(dol_sanitizeFileName($tmppdf), '/').'_[a-zA-Z0-9\-\_\'\&\.]+\.pdf$'; // To include PDF generated from ODX files } $listoffiles = dol_dir_list($uploaddir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true); diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index f38be7f58ec..18f6d278d8e 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -544,7 +544,7 @@ class modFacture extends DolibarrModules $this->export_fields_array[$r] = $this->export_fields_array[$r] + array( 'fd.rowid'=>'LineId', 'fd.description'=>"LineDescription", 'fd.subprice'=>"LineUnitPrice", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.total_ht'=>"LineTotalHT", 'fd.total_tva'=>"LineTotalVAT", - 'fd.total_ttc'=>"LineTotalTTC", 'fd.date_start'=>"DateStart", 'fd.date_end'=>"DateEnd", 'fd.special_code'=>'SpecialCode', + 'fd.total_ttc'=>"LineTotalTTC", 'fd.buy_price_ht'=>'BuyingPrice', 'fd.date_start'=>"DateStart", 'fd.date_end'=>"DateEnd", 'fd.special_code'=>'SpecialCode', 'fd.product_type'=>"TypeOfLineServiceOrProduct", 'fd.fk_product'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', $alias_product_perentity . '.accountancy_code_sell'=>'ProductAccountancySellCode', 'aa.account_number' => 'AccountingAffectation' @@ -562,7 +562,7 @@ class modFacture extends DolibarrModules 'f.entity'=>'List:entity:label:rowid', 'f.fk_user_author'=>'Numeric', 'uc.login'=>'Text', 'f.fk_user_valid'=>'Numeric', 'uv.login'=>'Text', 'pj.ref'=>'Text', 'pj.title'=>'Text', 'fd.rowid'=>'Numeric', 'fd.description'=>"Text", 'fd.subprice'=>"Numeric", 'fd.tva_tx'=>"Numeric", - 'fd.qty'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_tva'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.date_start'=>"Date", 'fd.date_end'=>"Date", + 'fd.qty'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_tva'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.buy_price_ht'=>"Numeric", 'fd.date_start'=>"Date", 'fd.date_end'=>"Date", 'fd.special_code'=>'Numeric', 'fd.product_type'=>"Numeric", 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', $alias_product_perentity . '.accountancy_code_sell'=>'Text', 'aa.account_number' => 'Text' @@ -572,12 +572,13 @@ class modFacture extends DolibarrModules 's.siren'=>'company', 's.siret'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company', 's.tva_intra'=>'company', 't.libelle'=>'company', // 'ce.code'=>'company', 'cfj.libelle'=>'company' 'pj.ref'=>'project', 'pj.title'=>'project', 'fd.rowid'=>'invoice_line', 'fd.description'=>"invoice_line", - 'fd.subprice'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_tva'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.tva_tx'=>"invoice_line", + 'fd.subprice'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_tva'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.buy_price_ht'=>'invoice_line', 'fd.tva_tx'=>"invoice_line", 'fd.qty'=>"invoice_line", 'fd.date_start'=>"invoice_line", 'fd.date_end'=>"invoice_line", 'fd.special_code'=>'invoice_line', 'fd.product_type'=>'invoice_line', 'fd.fk_product'=>'product', 'p.ref'=>'product', 'p.label'=>'product', $alias_product_perentity . '.accountancy_code_sell'=>'product', 'f.fk_user_author'=>'user', 'uc.login'=>'user', 'f.fk_user_valid'=>'user', 'uv.login'=>'user', 'aa.account_number' => "invoice_line", ); + $this->export_help_array[$r] = array('fd.buy_price_ht'=>'CostPriceUsage'); $this->export_special_array[$r] = array('none.rest'=>'getRemainToPay'); $this->export_dependencies_array[$r] = array('invoice_line'=>'fd.rowid', 'product'=>'fd.rowid', 'none.rest'=>array('f.rowid', 'f.total_ttc', 'f.close_code')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $keyforselect = 'facture'; diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 817ec534b4b..2b4eff09aa6 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -301,6 +301,7 @@ if ($massaction == 'presend') { $formmail->param['id'] = join(',', $arrayofselected); // $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && count($listofselectedrecipientobjid) > $conf->global->MAILING_LIMIT_SENDBYWEB) { + // Note: MAILING_LIMIT_SENDBYWEB may be forced by conf.php file and variable $dolibarr_mailing_limit_sendbyweb $langs->load("errors"); print img_warning().' '.$langs->trans('WarningNumberOfRecipientIsRestrictedInMassAction', $conf->global->MAILING_LIMIT_SENDBYWEB); print ' - '.$langs->trans("GoBack").''; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 4ec1d6d94d4..1d3367c99c6 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2620,10 +2620,22 @@ if ($action == 'create') { ,async:false ,dataType:"json" ,success:function(response) { - if (response.response_status == "success"){ - jQuery("#value_unit_ht").val(response.data); - jQuery("#value_unit_ht").trigger("change"); - jQuery("#value_unit").val(""); + if (response.response_status == "success"){'; + + if (!empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY)) { + print ' + jQuery("#value_unit").val(parseFloat(response.data) * (100 + parseFloat(tva)) / 100); + jQuery("#value_unit").trigger("change"); + '; + } else { + print ' + jQuery("#value_unit_ht").val(response.data); + jQuery("#value_unit_ht").trigger("change"); + jQuery("#value_unit").val(""); + '; + } + + print ' } else if(response.response_status == "error" && response.errorMessage != undefined && response.errorMessage.length > 0 ){ $.jnotify(response.errorMessage, "error", {timeout: 0, type: "error"},{ remove: function (){} } ); } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 19296ba50f6..f9cbcc76567 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1582,6 +1582,9 @@ if ($source == 'member' || $source == 'membersubscription') { $_GET['newamount'] = $member->last_subscription_amount; $_GET['amount'] = $member->last_subscription_amount; } + if (!empty($member->last_subscription_amount) && !GETPOSTISSET('newamount') && is_numeric($amount)) { + $amount = max($member->last_subscription_amount, $amount); + } } if ($member->type) {