Debug v9
This commit is contained in:
parent
087b68948d
commit
d3893b8b95
@ -490,7 +490,7 @@ class FormProjets
|
||||
if ($table_element == 'projet_task') return ''; // Special cas of element we never link to a project (already always done)
|
||||
|
||||
$linkedtothirdparty=false;
|
||||
if (! in_array($table_element, array('don','expensereport_det','expensereport','loan','stock_mouvement','chargesociales'))) $linkedtothirdparty=true;
|
||||
if (! in_array($table_element, array('don','expensereport_det','expensereport','loan','stock_mouvement','payment_salary','payment_various','chargesociales'))) $linkedtothirdparty=true;
|
||||
|
||||
$sqlfilter='';
|
||||
|
||||
@ -533,6 +533,9 @@ class FormProjets
|
||||
$sql = 'SELECT t.rowid, t.label as ref';
|
||||
$projectkey='fk_origin';
|
||||
break;
|
||||
case "payment_salary":
|
||||
$sql = "SELECT t.rowid, t.num_payment as ref"; // TODO In a future fill and use real ref field
|
||||
break;
|
||||
case "payment_various":
|
||||
$sql = "SELECT t.rowid, t.num_payment as ref";
|
||||
break;
|
||||
|
||||
@ -72,8 +72,11 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203);
|
||||
|
||||
ALTER TABLE llx_payment_salary ADD COLUMN ref varchar(30) NULL;
|
||||
ALTER TABLE llx_payment_salary ADD COLUMN fk_projet integer DEFAULT NULL after amount;
|
||||
|
||||
ALTER TABLE llx_payment_various ADD COLUMN ref varchar(30) NULL;
|
||||
|
||||
ALTER TABLE llx_categorie ADD COLUMN ref_ext varchar(255);
|
||||
|
||||
ALTER TABLE llx_paiement ADD COLUMN ext_payment_id varchar(128);
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
create table llx_paiement
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
ref varchar(30) NOT NULL, -- payment reference number
|
||||
ref varchar(30) NULL, -- payment reference number
|
||||
entity integer DEFAULT 1 NOT NULL, -- Multi company id
|
||||
datec datetime, -- date de creation
|
||||
tms timestamp,
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
create table llx_payment_salary
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
ref varchar(30) NOT NULL, -- payment reference number
|
||||
tms timestamp,
|
||||
datec datetime, -- Create date
|
||||
fk_user integer NOT NULL,
|
||||
@ -28,7 +29,7 @@ create table llx_payment_salary
|
||||
amount double(24,8) NOT NULL DEFAULT 0,
|
||||
fk_projet integer DEFAULT NULL,
|
||||
fk_typepayment integer NOT NULL,
|
||||
num_payment varchar(50), -- ref
|
||||
num_payment varchar(50), -- num cheque or other
|
||||
label varchar(255),
|
||||
datesp date, -- date start period
|
||||
dateep date, -- date end period
|
||||
|
||||
@ -19,7 +19,8 @@
|
||||
create table llx_payment_various
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
num_payment varchar(50), -- ref
|
||||
ref varchar(30) NOT NULL, -- payment reference number
|
||||
num_payment varchar(50), -- num cheque or other
|
||||
label varchar(255),
|
||||
tms timestamp,
|
||||
datec datetime, -- Create date
|
||||
|
||||
@ -79,20 +79,20 @@ GoToListOfTimeConsumed=Go to list of time consumed
|
||||
GoToListOfTasks=Go to list of tasks
|
||||
GoToGanttView=Go to Gantt view
|
||||
GanttView=Gantt View
|
||||
ListProposalsAssociatedProject=List of the commercial proposals associated with the project
|
||||
ListOrdersAssociatedProject=List of customer orders associated with the project
|
||||
ListInvoicesAssociatedProject=List of customer invoices associated with the project
|
||||
ListPredefinedInvoicesAssociatedProject=List of customer template invoices associated with project
|
||||
ListSupplierOrdersAssociatedProject=List of supplier orders associated with the project
|
||||
ListSupplierInvoicesAssociatedProject=List of supplier invoices associated with the project
|
||||
ListContractAssociatedProject=List of contracts associated with the project
|
||||
ListShippingAssociatedProject=List of shippings associated with the project
|
||||
ListFichinterAssociatedProject=List of interventions associated with the project
|
||||
ListExpenseReportsAssociatedProject=List of expense reports associated with the project
|
||||
ListDonationsAssociatedProject=List of donations associated with the project
|
||||
ListVariousPaymentsAssociatedProject=List of miscellaneous payments associated with the project
|
||||
ListSalariesAssociatedProject=List of salaries associated with the project
|
||||
ListActionsAssociatedProject=List of events associated with the project
|
||||
ListProposalsAssociatedProject=List of the commercial proposals related to the project
|
||||
ListOrdersAssociatedProject=List of customer orders related to the project
|
||||
ListInvoicesAssociatedProject=List of customer invoices related to the project
|
||||
ListPredefinedInvoicesAssociatedProject=List of customer template invoices related to the project
|
||||
ListSupplierOrdersAssociatedProject=List of supplier orders related to the project
|
||||
ListSupplierInvoicesAssociatedProject=List of supplier invoices related to the project
|
||||
ListContractAssociatedProject=List of contracts related to the project
|
||||
ListShippingAssociatedProject=List of shippings related to the project
|
||||
ListFichinterAssociatedProject=List of interventions related to the project
|
||||
ListExpenseReportsAssociatedProject=List of expense reports related to the project
|
||||
ListDonationsAssociatedProject=List of donations related to the project
|
||||
ListVariousPaymentsAssociatedProject=List of miscellaneous payments related to the project
|
||||
ListSalariesAssociatedProject=List of payments of salaries related to the project
|
||||
ListActionsAssociatedProject=List of events related to the project
|
||||
ListTaskTimeUserProject=List of time consumed on tasks of project
|
||||
ListTaskTimeForTask=List of time consumed on task
|
||||
ActivityOnProjectToday=Activity on project today
|
||||
|
||||
@ -451,7 +451,7 @@ $listofreferent=array(
|
||||
'disableamount'=>0,
|
||||
'urlnew'=>DOL_URL_ROOT.'/compta/salaries/card.php?action=create&projectid='.$id,
|
||||
'lang'=>'salaries',
|
||||
'buttonnew'=>'AddSalariesPayment',
|
||||
'buttonnew'=>'AddSalaryPayment',
|
||||
'testnew'=>$user->rights->salaries->write,
|
||||
'test'=>$conf->salaries->enabled && $user->rights->salaries->read),
|
||||
'variouspayment'=>array(
|
||||
@ -872,7 +872,9 @@ foreach ($listofreferent as $key => $value)
|
||||
{
|
||||
if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true
|
||||
{
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $projectid . '&action=unlink&tablename=' . $tablename . '&elementselect=' . $element->id . '">' . img_picto($langs->trans('Unlink'), 'editdelete') . '</a>';
|
||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $projectid . '&action=unlink&tablename=' . $tablename . '&elementselect=' . $element->id . '" class="reposition">';
|
||||
print img_picto($langs->trans('Unlink'), 'unlink');
|
||||
print '</a>';
|
||||
}
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
@ -399,6 +399,11 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
||||
print nl2br($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Bill time ?
|
||||
print '<tr><td>'.$langs->trans("BillTime").'</td><td>';
|
||||
print yn($projectstatic->bill_time);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
@ -1090,7 +1095,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
||||
if (isset($task_time->total_ht)) print price($valuebilled, 1, $langs, 1, -1, -1, $conf->currency);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! $i) $totalarray['totalvaluefield']=$totalarray['nbfield'];
|
||||
if (! $i) $totalarray['totalvaluebilledfield']=$totalarray['nbfield'];
|
||||
$totalarray['totalvaluebilled'] += $valuebilled;
|
||||
}
|
||||
|
||||
@ -1152,6 +1157,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
||||
}
|
||||
elseif ($totalarray['totaldurationfield'] == $i) print '<td align="right">'.convertSecondToTime($totalarray['totalduration'],'allhourmin').'</td>';
|
||||
elseif ($totalarray['totalvaluefield'] == $i) print '<td align="right">'.price($totalarray['totalvalue']).'</td>';
|
||||
elseif ($totalarray['totalvaluebilledfield'] == $i) print '<td align="right">'.price($totalarray['totalvaluebilled']).'</td>';
|
||||
else print '<td></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user