Fixing style errors.

This commit is contained in:
stickler-ci 2020-03-31 14:36:42 +00:00
parent fdffbf42f9
commit 004d9381f5
2 changed files with 14 additions and 14 deletions

View File

@ -3359,18 +3359,18 @@ if ($action == 'create')
if($conf->global->INVOICE_USE_RETAINED_WARRANTY){ if($conf->global->INVOICE_USE_RETAINED_WARRANTY){
$rwStyle = 'display:none;'; $rwStyle = 'display:none;';
if(in_array(GETPOST('type', 'int'), $RetainedWarrantyInvoiceAvailableType)){ if(in_array(GETPOST('type', 'int'), $RetainedWarrantyInvoiceAvailableType)){
$rwStyle = ''; $rwStyle = '';
} }
$retained_warranty = GETPOST('retained_warranty', 'int'); $retained_warranty = GETPOST('retained_warranty', 'int');
if(empty($retained_warranty)){ if(empty($retained_warranty)){
if(!empty($objectsrc->retained_warranty)){ // use previous situation value if(!empty($objectsrc->retained_warranty)){ // use previous situation value
$retained_warranty = $objectsrc->retained_warranty; $retained_warranty = $objectsrc->retained_warranty;
}else{ }else{
$retained_warranty = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; $retained_warranty = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
} }
} }
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">'; print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">';
print '<input id="new-situation-invoice-retained-warranty" name="retained_warranty" type="number" value="'.$retained_warranty.'" step="0.01" min="0" max="100" />%'; print '<input id="new-situation-invoice-retained-warranty" name="retained_warranty" type="number" value="'.$retained_warranty.'" step="0.01" min="0" max="100" />%';

View File

@ -3724,10 +3724,10 @@ class Facture extends CommonInvoice
$moduleSourceName = 'Invoice'; $moduleSourceName = 'Invoice';
$addonConstName = 'FACTURE_ADDON'; $addonConstName = 'FACTURE_ADDON';
// Clean parameters (if not defined or using deprecated value) // Clean parameters (if not defined or using deprecated value)
if (empty($conf->global->FACTURE_ADDON)) $conf->global->FACTURE_ADDON = 'mod_facture_terre'; if (empty($conf->global->FACTURE_ADDON)) $conf->global->FACTURE_ADDON = 'mod_facture_terre';
elseif ($conf->global->FACTURE_ADDON == 'terre') $conf->global->FACTURE_ADDON = 'mod_facture_terre'; elseif ($conf->global->FACTURE_ADDON == 'terre') $conf->global->FACTURE_ADDON = 'mod_facture_terre';
elseif ($conf->global->FACTURE_ADDON == 'mercure') $conf->global->FACTURE_ADDON = 'mod_facture_mercure'; elseif ($conf->global->FACTURE_ADDON == 'mercure') $conf->global->FACTURE_ADDON = 'mod_facture_mercure';
$addon = $conf->global->FACTURE_ADDON; $addon = $conf->global->FACTURE_ADDON;
} }