Fix conditions of some fields
This commit is contained in:
parent
7c480f76e3
commit
1f2d275ef2
@ -141,7 +141,7 @@ $checkedtypetiers=0;
|
|||||||
$arrayfields=array(
|
$arrayfields=array(
|
||||||
'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||||
'p.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
|
'p.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1),
|
||||||
'pr.ref'=>array('label'=>$langs->trans("Project"), 'checked'=>1, 'enabled'=>$conf->projet->enabled),
|
'pr.ref'=>array('label'=>$langs->trans("Project"), 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)),
|
||||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
||||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
||||||
|
|||||||
@ -99,8 +99,8 @@ $arrayfields=array(
|
|||||||
'e.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
'e.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||||
'e.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
'e.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||||
'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||||
'l.ref'=>array('label'=>$langs->trans("DeliveryRef"), 'checked'=>1, 'enabled'=>$conf->livraison_bon->enabled),
|
'l.ref'=>array('label'=>$langs->trans("DeliveryRef"), 'checked'=>1, 'enabled'=>(empty($conf->livraison_bon->enabled)?0:1)),
|
||||||
'l.date_delivery'=>array('label'=>$langs->trans("DateReceived"), 'checked'=>1, 'enabled'=>$conf->livraison_bon->enabled),
|
'l.date_delivery'=>array('label'=>$langs->trans("DateReceived"), 'checked'=>1, 'enabled'=>(empty($conf->livraison_bon->enabled)?0:1)),
|
||||||
'e.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)))
|
'e.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(!empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -119,7 +119,7 @@ if (empty($user->socid)) $fieldstosearchall["p.note_private"]="NotePrivate";
|
|||||||
$arrayfields=array(
|
$arrayfields=array(
|
||||||
'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||||
'p.title'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
'p.title'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
|
||||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'enabled'=>$conf->societe->enabled),
|
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'enabled'=>(empty($conf->societe->enabled)?0:1)),
|
||||||
'commercial'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0),
|
'commercial'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0),
|
||||||
'p.dateo'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>100),
|
'p.dateo'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>100),
|
||||||
'p.datee'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>101),
|
'p.datee'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>101),
|
||||||
|
|||||||
@ -619,7 +619,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
$arrayfields['author']=array('label'=>$langs->trans("By"), 'checked'=>1);
|
$arrayfields['author']=array('label'=>$langs->trans("By"), 'checked'=>1);
|
||||||
$arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1);
|
$arrayfields['t.note']=array('label'=>$langs->trans("Note"), 'checked'=>1);
|
||||||
$arrayfields['t.task_duration']=array('label'=>$langs->trans("Duration"), 'checked'=>1);
|
$arrayfields['t.task_duration']=array('label'=>$langs->trans("Duration"), 'checked'=>1);
|
||||||
$arrayfields['value']=array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>$conf->salaries->enabled);
|
$arrayfields['value'] =array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>(empty($conf->salaries->enabled)?0:1));
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -847,8 +847,10 @@ if ($source == 'invoice')
|
|||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
print '<tr class="CTableRow'.($var?'1':'2').'"><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Amount");
|
print '<tr class="CTableRow'.($var?'1':'2').'"><td class="CTableRow'.($var?'1':'2').'">'.$langs->trans("Amount");
|
||||||
if (empty($amount)) print ' ('.$langs->trans("ToComplete").')';
|
if (empty($amount) && empty($object->paye)) print ' ('.$langs->trans("ToComplete").')';
|
||||||
print '</td><td class="CTableRow'.($var?'1':'2').'">';
|
print '</td><td class="CTableRow'.($var?'1':'2').'">';
|
||||||
|
if (empty($object->paye))
|
||||||
|
{
|
||||||
if (empty($amount) || ! is_numeric($amount))
|
if (empty($amount) || ! is_numeric($amount))
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="amount" value="'.GETPOST("amount",'int').'">';
|
print '<input type="hidden" name="amount" value="'.GETPOST("amount",'int').'">';
|
||||||
@ -862,6 +864,11 @@ if ($source == 'invoice')
|
|||||||
// Currency
|
// Currency
|
||||||
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
print ' <b>'.$langs->trans("Currency".$currency).'</b>';
|
||||||
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
print '<input type="hidden" name="currency" value="'.$currency.'">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print price($object->total_ttc, 1, $langs);
|
||||||
|
}
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Tag
|
// Tag
|
||||||
@ -1289,6 +1296,12 @@ print "\n";
|
|||||||
if ($action != 'dopayment')
|
if ($action != 'dopayment')
|
||||||
{
|
{
|
||||||
if ($found && ! $error) // We are in a management option and no error
|
if ($found && ! $error) // We are in a management option and no error
|
||||||
|
{
|
||||||
|
if ($source == 'invoice' && $object->paye)
|
||||||
|
{
|
||||||
|
print '<br><br>'.$langs->trans("InvoicePaid");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Buttons for all payments registration methods
|
// Buttons for all payments registration methods
|
||||||
|
|
||||||
@ -1318,6 +1331,7 @@ if ($action != 'dopayment')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error_email('ERRORNEWPAYMENT');
|
dol_print_error_email('ERRORNEWPAYMENT');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user