Add retained warranty in list
This commit is contained in:
parent
40369280ba
commit
70eddf5d55
@ -170,6 +170,12 @@ $arrayfields=array(
|
|||||||
'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||||
'f.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
'f.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)
|
||||||
|
{
|
||||||
|
$arrayfields['f.retained_warranty'] = array('label'=>$langs->trans("RetainedWarranty"), 'checked'=>0, 'position'=>2000);
|
||||||
|
}
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
@ -362,6 +368,10 @@ $sql.= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
|
|||||||
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
|
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
|
||||||
$sql.= ' f.paye as paye, f.fk_statut,';
|
$sql.= ' f.paye as paye, f.fk_statut,';
|
||||||
$sql.= ' f.datec as date_creation, f.tms as date_update,';
|
$sql.= ' f.datec as date_creation, f.tms as date_update,';
|
||||||
|
if($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)
|
||||||
|
{
|
||||||
|
$sql.= ' f.retained_warranty,';
|
||||||
|
}
|
||||||
$sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
|
$sql.= ' s.rowid as socid, s.nom as name, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
|
||||||
$sql.= " typent.code as typent_code,";
|
$sql.= " typent.code as typent_code,";
|
||||||
$sql.= " state.code_departement as state_code, state.nom as state_name,";
|
$sql.= " state.code_departement as state_code, state.nom as state_name,";
|
||||||
@ -828,6 +838,13 @@ if ($resql)
|
|||||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! empty($arrayfields['f.retained_warranty']['checked']))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre" align="right">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['dynamount_payed']['checked']))
|
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
@ -838,6 +855,7 @@ if ($resql)
|
|||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||||
|
|
||||||
@ -891,6 +909,7 @@ if ($resql)
|
|||||||
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'],$_SERVER['PHP_SELF'],'f.localtax1','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'],$_SERVER['PHP_SELF'],'f.localtax1','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'],$_SERVER['PHP_SELF'],'f.localtax2','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'],$_SERVER['PHP_SELF'],'f.localtax2','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'],$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'],$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
|
if (! empty($arrayfields['f.retained_warranty']['checked'])) print_liste_field_titre($arrayfields['f.retained_warranty']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
|
||||||
// Extra fields
|
// Extra fields
|
||||||
@ -1118,6 +1137,11 @@ if ($resql)
|
|||||||
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
if (! $i) $totalarray['totalttcfield']=$totalarray['nbfield'];
|
||||||
$totalarray['totalttc'] += $obj->total_ttc;
|
$totalarray['totalttc'] += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! empty($arrayfields['f.retained_warranty']['checked']))
|
||||||
|
{
|
||||||
|
print '<td align="right">'.(! empty($obj->retained_warranty)?price($obj->retained_warranty).'%':' ').'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($arrayfields['dynamount_payed']['checked']))
|
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user