NEW Hidden conf INVOICE_USE_DEFAULT_DOCUMENT
This commit is contained in:
parent
f4384fa76d
commit
af66a8971a
@ -610,7 +610,8 @@ foreach ($dirmodels as $reldir)
|
|||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
|
||||||
|
{
|
||||||
/*
|
/*
|
||||||
* Document templates generators
|
* Document templates generators
|
||||||
*/
|
*/
|
||||||
@ -649,7 +650,7 @@ foreach ($listtype as $type => $trans)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Modes de reglement
|
* Modes de reglement
|
||||||
|
|||||||
@ -2779,7 +2779,8 @@ if ($action == 'create')
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
|
||||||
|
{
|
||||||
// Add auto select default document model
|
// Add auto select default document model
|
||||||
$listtType=array(Facture::TYPE_STANDARD,Facture::TYPE_REPLACEMENT,Facture::TYPE_CREDIT_NOTE,Facture::TYPE_DEPOSIT,Facture::TYPE_SITUATION);
|
$listtType=array(Facture::TYPE_STANDARD,Facture::TYPE_REPLACEMENT,Facture::TYPE_CREDIT_NOTE,Facture::TYPE_DEPOSIT,Facture::TYPE_SITUATION);
|
||||||
$jsListType='';
|
$jsListType='';
|
||||||
@ -2808,7 +2809,7 @@ if ($action == 'create')
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -2902,8 +2903,13 @@ if ($action == 'create')
|
|||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
|
||||||
$liste = ModelePDFFactures::liste_modeles($db);
|
$liste = ModelePDFFactures::liste_modeles($db);
|
||||||
|
if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)){ // Hidden conf
|
||||||
$paramkey='FACTURE_ADDON_PDF_'.$object->type;
|
$paramkey='FACTURE_ADDON_PDF_'.$object->type;
|
||||||
$curent = !empty($conf->global->$paramkey)?$conf->global->$paramkey:$conf->global->FACTURE_ADDON_PDF;
|
$curent = !empty($conf->global->$paramkey)?$conf->global->$paramkey:$conf->global->FACTURE_ADDON_PDF;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$curent = $conf->global->FACTURE_ADDON_PDF;
|
||||||
|
}
|
||||||
print $form->selectarray('model', $liste, $curent);
|
print $form->selectarray('model', $liste, $curent);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user