Automated merge from 20.0 to 21.0 by tool pullmerge.sh
This commit is contained in:
commit
488366cf06
3 changed files with 44 additions and 17 deletions
|
|
@ -845,19 +845,39 @@ if ($action == 'export_file') {
|
|||
}
|
||||
|
||||
// add documents in an archive for some accountancy export format
|
||||
if (getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_QUADRATUS
|
||||
|| getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_FEC
|
||||
|| getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_FEC2
|
||||
) {
|
||||
$form_question['notifiedexportfull'] = array(
|
||||
'name' => 'notifiedexportfull',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotifiedExportFull'),
|
||||
'value' => 'false',
|
||||
);
|
||||
}
|
||||
$exportTypesWithDocs = array(
|
||||
AccountancyExport::$EXPORT_TYPE_QUADRATUS,
|
||||
AccountancyExport::$EXPORT_TYPE_FEC,
|
||||
AccountancyExport::$EXPORT_TYPE_FEC2
|
||||
);
|
||||
|
||||
$form_question['notifiedexportfull'] = array(
|
||||
'name' => 'notifiedexportfull',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotifiedExportFull'),
|
||||
'value' => 'false',
|
||||
);
|
||||
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").'...', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 500, 700);
|
||||
|
||||
$formconfirm .= '<script>
|
||||
jQuery(document).ready(function() {
|
||||
const exportTypesWithDocs = ['.implode(',', $exportTypesWithDocs).'];
|
||||
const $formatExport = jQuery("#formatexport");
|
||||
|
||||
function toggleExportFull() {
|
||||
const $checkbox = jQuery("#notifiedexportfull");
|
||||
const show = exportTypesWithDocs.indexOf(parseInt($formatExport.val())) !== -1;
|
||||
$checkbox.closest(".tagtr").toggle(show);
|
||||
if (!show) {
|
||||
$checkbox.prop("checked", false); // remove checked if hidden
|
||||
}
|
||||
}
|
||||
|
||||
$formatExport.on("change", toggleExportFull);
|
||||
toggleExportFull();
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
|
||||
// Print form confirm
|
||||
|
|
|
|||
|
|
@ -1733,8 +1733,12 @@ abstract class CommonDocGenerator
|
|||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) {
|
||||
// Enable extrafield ?
|
||||
$enabled = 0;
|
||||
if (!empty($extrafields->attributes[$object->table_element]['enabled'][$key])) {
|
||||
$enabled = (int) dol_eval((string) $extrafields->attributes[$object->table_element]['enabled'][$key], 1, 1, '2');
|
||||
}
|
||||
|
||||
$disableOnEmpty = 0;
|
||||
if (!empty($extrafields->attributes[$object->table_element]['printable'][$key])) {
|
||||
if ($enabled && !empty($extrafields->attributes[$object->table_element]['printable'][$key])) {
|
||||
$printable = intval($extrafields->attributes[$object->table_element]['printable'][$key]);
|
||||
if (in_array($printable, $params['printableEnable']) || in_array($printable, $params['printableEnableNotEmpty'])) {
|
||||
$enabled = 1;
|
||||
|
|
|
|||
|
|
@ -1124,7 +1124,7 @@ if ($resql) {
|
|||
if (isModEnabled('productbatch') && $product_static->hasbatch()) {
|
||||
$valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->detail_batch[$obj->batch]->qty ?? 0;
|
||||
} else {
|
||||
$valuetoshow = $product_static->stock_warehouse[$obj->fk_warehouse]->real ?? 0;
|
||||
$valuetoshow = !empty($product_static->stock_warehouse[$obj->fk_warehouse]->real) ? $product_static->stock_warehouse[$obj->fk_warehouse]->real : 0;
|
||||
}
|
||||
}
|
||||
print price2num($valuetoshow, 'MS');
|
||||
|
|
@ -1299,10 +1299,11 @@ print '<script type="text/javascript">
|
|||
success: function(result){
|
||||
window.location.href = "'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&page='.($page + 1).$paramwithsearch.'";
|
||||
}});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$(".paginationprevious:last").click(function(e){
|
||||
$(".paginationprevious:last").click(function(e){
|
||||
var form = $("#formrecord");
|
||||
var actionURL = "'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&page='.($page).$paramwithsearch.'";
|
||||
$.ajax({
|
||||
|
|
@ -1312,9 +1313,10 @@ print '<script type="text/javascript">
|
|||
success: function(result){
|
||||
window.location.href = "'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&page='.($page - 1).$paramwithsearch.'";
|
||||
}});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#idbuttonmakemovementandclose").click(function(e){
|
||||
$("#idbuttonmakemovementandclose").click(function(e){
|
||||
var form = $("#formrecord");
|
||||
var actionURL = "'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&page='.($page).$paramwithsearch.'";
|
||||
$.ajax({
|
||||
|
|
@ -1324,7 +1326,8 @@ print '<script type="text/javascript">
|
|||
success: function(result){
|
||||
window.location.href = "'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&page='.($page - 1).$paramwithsearch.'&action=record";
|
||||
}});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue