40 $salary =
$object->checkIfSalaryBonPrelevement();
42 $langs->loadLangs(array(
"bills",
"withdrawals"));
47 $titleoftab =
"WithdrawalsReceipts";
48 if (
$object->type ==
'bank-transfer') {
49 $titleoftab =
"BankTransferReceipts";
52 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/compta/prelevement/card.php', [
'id' =>
$object->id]);
53 $head[$h][1] = $langs->trans($titleoftab);
54 $head[$h][2] =
'prelevement';
57 $titleoftab = $langs->trans(
"Bills");
58 if (
$object->type ==
'bank-transfer') {
59 $titleoftab = $langs->trans(
"SupplierBills");
62 $titleoftab = $langs->trans(
"Salaries");
65 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/compta/prelevement/factures.php', [
'id' =>
$object->id]);
66 $head[$h][1] = $titleoftab;
67 $head[$h][2] =
'invoices';
70 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/compta/prelevement/fiche-rejet.php', [
'id' =>
$object->id]);
71 $head[$h][1] = $langs->trans(
"Rejects");
72 $head[$h][2] =
'rejects';
75 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/compta/prelevement/fiche-stat.php', [
'id' =>
$object->id]);
76 $head[$h][1] = $langs->trans(
"Statistics");
77 $head[$h][2] =
'statistics';
101 if ($type ==
'bank-transfer') {
131 global $langs, $conf;
136 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/compta/prelevement/create.php', [
'type' =>
'bank-transfer']);
137 $head[$h][1] = ($nbOfInvoices <= 0 ? $langs->trans(
"Invoices") : $langs->trans(
"Invoices").
'<span class="badge marginleftonlyshort">'.$nbOfInvoices.
'</span>');
138 $head[$h][2] =
'invoice';
143 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/compta/prelevement/create.php', [
'type' =>
'bank-transfer',
'sourcetype' =>
'salary']);
144 $head[$h][1] = ($nbOfSalaryInvoice <= 0 ? $langs->trans(
"Salaries") : $langs->trans(
"Salaries").
'<span class="badge marginleftonlyshort">'.$nbOfSalaryInvoice.
'</span>');
145 $head[$h][2] =
'salary';
if(! $sortfield) if(! $sortorder) $object
Class to manage withdrawal receipts.
dolBuildUrl($url, $params=[], $addtoken=false)
Return path of url.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
bon_prelevement_prepare_head(BonPrelevement $object, $nbOfInvoices, $nbOfSalaryInvoice)
Return array head with list of tabs to view object information.
prelevement_prepare_head(BonPrelevement $object)
Prepare array with list of tabs.
prelevement_check_config($type='direct-debit')
Check need data to create standigns orders receipt file.