Merge branch '12.0_new_extend_retained_warranty' of github.com:atm-john/dolibarr into 12.0_new_extend_retained_warranty

This commit is contained in:
John Botella 2020-02-19 12:31:32 +01:00
commit 48a9eb71ea
3 changed files with 5 additions and 5 deletions

View File

@ -96,9 +96,9 @@ print "</tr>\n";
_printOnOff('INVOICE_USE_SITUATION', $langs->trans('UseSituationInvoices'));
_printOnOff('INVOICE_USE_SITUATION_CREDIT_NOTE', $langs->trans('UseSituationInvoicesCreditNote'));
_printOnOff('INVOICE_USE_RETAINED_WARRANTY',$langs->trans('Retainedwarranty'));
_printOnOff('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION',$langs->trans('RetainedwarrantyOnlyForSituation'));
_printOnOff('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL',$langs->trans('RetainedwarrantyOnlyForSituationFinal'));
_printOnOff('INVOICE_USE_RETAINED_WARRANTY', $langs->trans('Retainedwarranty'));
_printOnOff('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION', $langs->trans('RetainedwarrantyOnlyForSituation'));
_printOnOff('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL', $langs->trans('RetainedwarrantyOnlyForSituationFinal'));
$metas = array(
'type' => 'number',

View File

@ -3332,7 +3332,6 @@ if ($action == 'create')
if($conf->global->INVOICE_USE_RETAINED_WARRANTY){
$rwStyle = 'display:none;';
if(in_array(GETPOST('type', 'int'), $RetainedWarrantyInvoiceAvailableType)){
$rwStyle = '';

View File

@ -4610,7 +4610,8 @@ class Facture extends CommonInvoice
* Currently used for documents generation : to know if retained warranty need to be displayed
* @return bool
*/
function displayRetainedWarranty(){
function displayRetainedWarranty()
{
global $conf;
// TODO : add a flag on invoices to store this conf : USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL