Generation of invoice for timespent works on all timesheet tabs
This commit is contained in:
parent
ecc7afa4e3
commit
4e09867b01
@ -315,12 +315,17 @@ elseif (GETPOST('project_ref', 'alpha'))
|
|||||||
$projectidforalltimes=$projectstatic->id;
|
$projectidforalltimes=$projectstatic->id;
|
||||||
$withproject=1;
|
$withproject=1;
|
||||||
}
|
}
|
||||||
|
elseif ($id > 0)
|
||||||
|
{
|
||||||
|
$object->fetch($id);
|
||||||
|
$result=$projectstatic->fetch($object->fk_project);
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'confirm_generateinvoice')
|
if ($action == 'confirm_generateinvoice')
|
||||||
{
|
{
|
||||||
if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
|
if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty();
|
||||||
|
|
||||||
//->fetch_thirdparty();
|
|
||||||
if (! ($projectstatic->thirdparty->id > 0))
|
if (! ($projectstatic->thirdparty->id > 0))
|
||||||
{
|
{
|
||||||
setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors');
|
setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors');
|
||||||
@ -802,7 +807,10 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print $langs->trans('Mode');
|
print $langs->trans('Mode');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$tmparray=array('onelineperuser'=>'OneLinePerUser');
|
$tmparray=array(
|
||||||
|
'onelineperuser'=>'OneLinePerUser',
|
||||||
|
//'onelinepertask'=>'OneLinePerTask',
|
||||||
|
);
|
||||||
print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1);
|
print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user