27 require
'../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/chargesociales.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/compta/sociales/class/paymentsocialcontribution.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formsocialcontrib.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/tax.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
34 if (!empty($conf->projet->enabled)) {
35 include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
36 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
38 if (!empty($conf->accounting->enabled)) {
39 include_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
43 $langs->loadLangs(array(
'compta',
'bills',
'banks'));
46 $action =
GETPOST(
'action',
'aZ09');
48 $projectid = (
GETPOST(
'projectid') ?
GETPOST(
'projectid',
'int') : 0);
52 $label =
GETPOST(
'label',
'alpha');
53 $actioncode =
GETPOST(
'actioncode');
56 $socid =
GETPOST(
'socid',
'int');
57 if ($user->socid) $socid = $user->socid;
58 $result =
restrictedArea($user,
'tax', $id,
'chargesociales',
'charges');
69 if ($action ==
'confirm_paid' && $user->rights->tax->charges->creer && $confirm ==
'yes')
72 $result = $object->set_paid($user);
75 if ($action ==
'reopen' && $user->rights->tax->charges->creer) {
76 $result = $object->fetch($id);
79 $result = $object->set_unpaid($user);
82 header(
'Location: '.
$_SERVER[
"PHP_SELF"].
'?id='.$id);
91 if ($action ==
'classin' && $user->rights->tax->charges->creer)
94 $object->setProject(
GETPOST(
'projectid'));
97 if ($action ==
'setlib' && $user->rights->tax->charges->creer)
100 $result = $object->setValueFrom(
'libelle',
GETPOST(
'lib'),
'',
'',
'text',
'', $user,
'TAX_MODIFY');
106 if ($action ==
'setmode' && $user->rights->tax->charges->creer) {
108 $result = $object->setPaymentMethods(
GETPOST(
'mode_reglement_id',
'int'));
114 if ($action ==
'setbankaccount' && $user->rights->tax->charges->creer) {
116 $result = $object->setBankAccount(
GETPOST(
'fk_account',
'int'));
123 if ($action ==
'confirm_delete' && $confirm ==
'yes')
126 $result = $object->delete($user);
128 header(
"Location: list.php");
137 if ($action ==
'add' && $user->rights->tax->charges->creer)
143 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Date")), null,
'errors');
145 } elseif (!$dateperiod)
147 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Period")), null,
'errors');
149 } elseif (!$actioncode > 0)
151 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Type")), null,
'errors');
153 } elseif (empty($amount))
155 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Amount")), null,
'errors');
157 } elseif (!is_numeric($amount)) {
158 setEventMessages($langs->trans(
"ErrorFieldMustBeANumeric", $langs->transnoentities(
"Amount")), null,
'errors');
161 $object->type = $actioncode;
162 $object->label =
GETPOST(
'label',
'alpha');
163 $object->date_ech = $dateech;
164 $object->periode = $dateperiod;
165 $object->amount = $amount;
166 $object->mode_reglement_id = (int)
GETPOST(
'mode_reglement_id',
'int');
167 $object->fk_account = (int)
GETPOST(
'fk_account',
'int');
168 $object->fk_project = (int)
GETPOST(
'fk_project',
'int');
170 $id = $object->create($user);
179 if ($action ==
'update' && !$_POST[
"cancel"] && $user->rights->tax->charges->creer)
185 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Date")), null,
'errors');
187 } elseif (!$dateperiod)
189 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Period")), null,
'errors');
191 } elseif (empty($amount))
193 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Amount")), null,
'errors');
195 } elseif (!is_numeric($amount))
197 setEventMessages($langs->trans(
"ErrorFieldMustBeANumeric", $langs->transnoentities(
"Amount")), null,
'errors');
200 $result = $object->fetch($id);
202 $object->date_ech = $dateech;
203 $object->periode = $dateperiod;
204 $object->amount = $amount;
206 $result = $object->update($user);
214 if ($action ==
'confirm_clone' && $confirm !=
'yes') { $action =
''; }
216 if ($action ==
'confirm_clone' && $confirm ==
'yes' && ($user->rights->tax->charges->creer))
227 $object->id = $object->ref = null;
229 if (
GETPOST(
'clone_label',
'alphanohtml')) {
230 $object->label =
GETPOST(
'clone_label',
'alphanohtml');
232 $object->label = $langs->trans(
"CopyOf").
' '.$object->label;
235 if (
GETPOST(
'clone_for_next_month',
'int')) {
241 if ($newdateperiod) $object->periode = $newdateperiod;
242 if ($newdateech) $object->date_ech = $newdateech;
245 if ($object->check())
247 $id = $object->create($user);
253 header(
"Location: ".
$_SERVER[
"PHP_SELF"].
"?id=".$id);
276 $form =
new Form($db);
278 $bankaccountstatic =
new Account($db);
279 if (!empty($conf->projet->enabled)) { $formproject =
new FormProjets($db); }
281 $title = $langs->trans(
"SocialContribution").
' - '.$langs->trans(
"Card");
282 $help_url =
'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)';
287 if ($action ==
'create')
291 print '<form name="charge" method="post" action="'.$_SERVER[
"PHP_SELF"].
'">';
292 print '<input type="hidden" name="token" value="'.newToken().
'">';
293 print '<input type="hidden" name="action" value="add">';
297 print '<table class="border centpercent">';
301 print '<td class="titlefieldcreate fieldrequired">';
302 print $langs->trans(
"Label");
304 print '<td><input type="text" name="label" class="flat minwidth300" value="'.dol_escape_htmltag(
GETPOST(
'label',
'alpha')).
'" autofocus></td>';
309 print '<td class="fieldrequired">';
310 print $langs->trans(
"Type");
313 $formsocialcontrib->select_type_socialcontrib(
GETPOST(
"actioncode",
'alpha') ?
GETPOST(
"actioncode",
'alpha') :
'',
'actioncode', 1);
319 print '<td class="fieldrequired">';
320 print $langs->trans(
"Date");
323 print $form->selectDate(!empty($dateech) ? $dateech :
'-1',
'ech', 0, 0, 0,
'charge', 1, 1);
329 print '<td class="fieldrequired">';
330 print $form->textwithpicto($langs->trans(
"PeriodEndDate"), $langs->trans(
"LastDayTaxIsRelatedTo"));
333 print $form->selectDate(!empty($dateperiod) ? $dateperiod :
'-1',
'period', 0, 0, 0,
'charge', 1);
339 print '<td class="fieldrequired">';
340 print $langs->trans(
"Amount");
342 print '<td><input type="text" size="6" name="amount" class="flat" value="'.dol_escape_htmltag(
GETPOST(
'amount',
'alpha')).
'"></td>';
346 if (!empty($conf->projet->enabled))
351 $langs->load(
"projects");
353 print '<tr><td>'.$langs->trans(
"Project").
'</td><td>';
355 $numproject = $formproject->select_projects(-1, $projectid,
'fk_project', 0, 0, 1, 1);
361 print '<tr><td>'.$langs->trans(
'PaymentMode').
'</td><td colspan="2">';
362 $form->select_types_paiements($mode_reglement_id,
'mode_reglement_id');
366 if (!empty($conf->banque->enabled))
368 print '<tr><td>'.$langs->trans(
'BankAccount').
'</td><td colspan="2">';
369 $form->select_comptes($fk_account,
'fk_account', 0,
'', 2);
377 print '<div class="center">';
378 print '<input type="submit" class="button" value="'.$langs->trans(
"Add").
'">';
379 print ' ';
380 print '<input type="button" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'" onClick="javascript:history.go(-1)">';
394 $result = $object->fetch($id);
400 $totalpaye = $object->getSommePaiement();
403 if ($action ===
'clone')
405 $formquestion = array(
406 array(
'type' =>
'text',
'name' =>
'clone_label',
'label' => $langs->trans(
"Label"),
'value' => $langs->trans(
"CopyOf").
' '.$object->label),
408 if (!empty($conf->global->TAX_ADD_CLON_FOR_NEXT_MONTH_CHECKBOX))
410 $formquestion[] = array(
'type' =>
'checkbox',
'name' =>
'clone_for_next_month',
'label' => $langs->trans(
"CloneTaxForNextMonth"),
'value' => 1);
412 $formquestion[] = array(
'type' =>
'date',
'name' =>
'clone_date_ech',
'label' => $langs->trans(
"Date"),
'value' => -1);
413 $formquestion[] = array(
'type' =>
'date',
'name' =>
'clone_period',
'label' => $langs->trans(
"PeriodEndDate"),
'value' => -1);
416 print $form->formconfirm(
$_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneTax', $object->ref),
'confirm_clone', $formquestion,
'yes', 1, 240);
420 if ($action ==
'paid')
422 $text = $langs->trans(
'ConfirmPaySocialContribution');
423 print $form->formconfirm(
$_SERVER[
"PHP_SELF"].
"?id=".$object->id, $langs->trans(
'PaySocialContribution'), $text,
"confirm_paid",
'',
'', 2);
427 if ($action ==
'delete')
429 $text = $langs->trans(
'ConfirmDeleteSocialContribution');
430 print $form->formconfirm(
$_SERVER[
'PHP_SELF'].
'?id='.$object->id, $langs->trans(
'DeleteSocialContribution'), $text,
'confirm_delete',
'',
'', 2);
433 if ($action ==
'edit')
435 print "<form name=\"charge\" action=\"".$_SERVER[
"PHP_SELF"].
"?id=$object->id&action=update\" method=\"post\">";
436 print '<input type="hidden" name="token" value="'.newToken().
'">';
441 $morehtmlref =
'<div class="refidno">';
443 $morehtmlref .= $form->editfieldkey(
"Label",
'lib', $object->label, $object, $user->rights->tax->charges->creer,
'string',
'', 0, 1);
444 $morehtmlref .= $form->editfieldval(
"Label",
'lib', $object->label, $object, $user->rights->tax->charges->creer,
'string',
'', null, null,
'', 1);
446 if (!empty($conf->projet->enabled))
448 $langs->load(
"projects");
449 $morehtmlref .=
'<br>'.$langs->trans(
'Project').
' ';
450 if ($user->rights->tax->charges->creer)
452 if ($action !=
'classify') {
453 $morehtmlref .=
'<a class="editfielda" href="'.$_SERVER[
'PHP_SELF'].
'?action=classify&id='.$object->id.
'">'.
img_edit($langs->transnoentitiesnoconv(
'SetProject')).
'</a> : ';
455 if ($action ==
'classify') {
457 $morehtmlref .=
'<form method="post" action="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'">';
458 $morehtmlref .=
'<input type="hidden" name="action" value="classin">';
459 $morehtmlref .=
'<input type="hidden" name="token" value="'.newToken().
'">';
460 $morehtmlref .= $formproject->select_projects(0, $object->fk_project,
'projectid', $maxlength, 0, 1, 0, 1, 0, 0,
'', 1);
461 $morehtmlref .=
'<input type="submit" class="button valignmiddle" value="'.$langs->trans(
"Modify").
'">';
462 $morehtmlref .=
'</form>';
464 $morehtmlref .= $form->form_project(
$_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->socid, $object->fk_project,
'none', 0, 0, 0, 1);
467 if (!empty($object->fk_project)) {
469 $proj->fetch($object->fk_project);
470 $morehtmlref .=
'<a href="'.DOL_URL_ROOT.
'/projet/card.php?id='.$object->fk_project.
'" title="'.$langs->trans(
'ShowProject').
'">';
471 $morehtmlref .= $proj->ref;
472 $morehtmlref .=
'</a>';
478 $morehtmlref .=
'</div>';
482 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
484 $object->totalpaye = $totalpaye;
486 dol_banner_tab($object,
'id', $linkback, 1,
'rowid',
'ref', $morehtmlref,
'', 0,
'', $morehtmlright);
488 print '<div class="fichecenter">';
489 print '<div class="fichehalfleft">';
490 print '<div class="underbanner clearboth"></div>';
492 print '<table class="border centpercent">';
495 print '<tr><td class="titlefield">';
496 print $langs->trans(
"Type").
"</td><td>".$object->type_label.
"</td>";
500 if ($action ==
'edit')
502 print '<tr><td>'.$langs->trans(
"Date").
"</td><td>";
503 print $form->selectDate($object->date_ech,
'ech', 0, 0, 0,
'charge', 1);
506 print "<tr><td>".$langs->trans(
"Date").
"</td><td>".
dol_print_date($object->date_ech,
'day').
"</td></tr>";
510 print "<tr><td>".$form->textwithpicto($langs->trans(
"PeriodEndDate"), $langs->trans(
"LastDayTaxIsRelatedTo")).
"</td>";
512 if ($action ==
'edit')
514 print $form->selectDate($object->periode,
'period', 0, 0, 0,
'charge', 1);
521 if ($action ==
'edit')
523 print '<tr><td>'.$langs->trans(
"AmountTTC").
"</td><td>";
524 print '<input type="text" name="amount" size="12" class="flat" value="'.price($object->amount).
'">';
527 print '<tr><td>'.$langs->trans(
"AmountTTC").
'</td><td>'.
price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).
'</td></tr>';
532 print '<table class="nobordernopadding" width="100%"><tr><td>';
533 print $langs->trans(
'PaymentMode');
535 if ($action !=
'editmode')
536 print '<td class="right"><a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?action=editmode&id='.$object->id.
'">'.
img_edit($langs->trans(
'SetMode'), 1).
'</a></td>';
537 print '</tr></table>';
539 if ($action ==
'editmode') {
540 $form->form_modes_reglement(
$_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->mode_reglement_id,
'mode_reglement_id');
542 $form->form_modes_reglement(
$_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->mode_reglement_id,
'none');
547 if (!empty($conf->banque->enabled))
549 print
'<tr><td class="nowrap">';
550 print
'<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
551 print $langs->trans(
'BankAccount');
553 if ($action !=
'editbankaccount' && $user->rights->tax->charges->creer)
554 print
'<td class="right"><a class="editfielda" href="'.$_SERVER[
"PHP_SELF"].
'?action=editbankaccount&id='.$object->id.
'">'.
img_edit($langs->trans(
'SetBankAccount'), 1).
'</a></td>';
555 print
'</tr></table>';
557 if ($action ==
'editbankaccount') {
558 $form->formSelectAccount(
$_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->fk_account,
'fk_account', 1);
560 $form->formSelectAccount(
$_SERVER[
'PHP_SELF'].
'?id='.$object->id, $object->fk_account,
'none');
569 print
'<div class="fichehalfright">';
570 print
'<div class="ficheaddleft">';
573 if (!empty($conf->banque->enabled)) {
580 $sql =
"SELECT p.rowid, p.num_paiement as num_payment, datep as dp, p.amount,";
581 $sql .=
" c.code as type_code,c.libelle as paiement_type,";
582 $sql .=
' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.currency_code as bacurrency_code, ba.fk_accountancy_journal';
583 $sql .=
" FROM ".MAIN_DB_PREFIX.
"paiementcharge as p";
584 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank as b ON p.fk_bank = b.rowid';
585 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank_account as ba ON b.fk_account = ba.rowid';
586 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as c ON p.fk_typepaiement = c.id";
587 $sql .=
", ".MAIN_DB_PREFIX.
"chargesociales as cs";
588 $sql .=
" WHERE p.fk_charge = ".$id;
589 $sql .=
" AND p.fk_charge = cs.rowid";
590 $sql .=
" AND cs.entity IN (".getEntity(
'tax').
")";
591 $sql .=
" ORDER BY dp DESC";
594 $resql = $db->query($sql);
599 $num = $db->num_rows(
$resql);
602 print
'<div class="div-table-responsive-no-min">';
603 print
'<table class="noborder paymenttable">';
604 print
'<tr class="liste_titre">';
605 print
'<td>'.$langs->trans(
"RefPayment").
'</td>';
606 print
'<td>'.$langs->trans(
"Date").
'</td>';
607 print
'<td>'.$langs->trans(
"Type").
'</td>';
608 if (!empty($conf->banque->enabled)) {
609 print
'<td class="liste_titre right">'.$langs->trans(
'BankAccount').
'</td>';
611 print
'<td class="right">'.$langs->trans(
"Amount").
'</td>';
620 $objp = $db->fetch_object(
$resql);
622 $paymentsocialcontributiontmp->id = $objp->rowid;
623 $paymentsocialcontributiontmp->ref = $objp->rowid;
624 $paymentsocialcontributiontmp->datep = $db->jdate($objp->dp);
626 print
'<tr class="oddeven"><td>';
627 print $paymentsocialcontributiontmp->getNomUrl(1);
630 print
'<td>'.dol_print_date($db->jdate($objp->dp),
'day').
"</td>\n";
631 $labeltype = $langs->trans(
"PaymentType".$objp->type_code) != (
"PaymentType".$objp->type_code) ? $langs->trans(
"PaymentType".$objp->type_code) : $objp->paiement_type;
632 print
"<td>".$labeltype.
' '.$objp->num_payment.
"</td>\n";
633 if (!empty($conf->banque->enabled))
635 $bankaccountstatic->id = $objp->baid;
636 $bankaccountstatic->ref = $objp->baref;
637 $bankaccountstatic->label = $objp->baref;
638 $bankaccountstatic->number = $objp->banumber;
639 $bankaccountstatic->currency_code = $objp->bacurrency_code;
641 if (!empty($conf->accounting->enabled)) {
642 $bankaccountstatic->account_number = $objp->account_number;
645 $accountingjournal->fetch($objp->fk_accountancy_journal);
646 $bankaccountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1,
'', 1);
649 print
'<td class="right">';
650 if ($bankaccountstatic->id)
651 print $bankaccountstatic->getNomUrl(1,
'transactions');
654 print
'<td class="right">'.price($objp->amount).
"</td>\n";
656 $totalpaye += $objp->amount;
660 print
'<tr class="oddeven"><td><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td>';
661 print
'<td></td><td></td><td></td><td></td>';
665 print
'<tr><td colspan="'.$nbcols.
'" class="right">'.$langs->trans(
"AlreadyPaid").
" :</td><td class=\"right\">".
price($totalpaye).
"</td></tr>\n";
666 print
'<tr><td colspan="'.$nbcols.
'" class="right">'.$langs->trans(
"AmountExpected").
" :</td><td class=\"right\">".
price($object->amount).
"</td></tr>\n";
668 $resteapayer = $object->amount - $totalpaye;
669 $cssforamountpaymentcomplete =
'amountpaymentcomplete';
671 print
'<tr><td colspan="'.$nbcols.
'" class="right">'.$langs->trans(
"RemainderToPay").
" :</td>";
672 print
'<td class="right'.($resteapayer ?
' amountremaintopay' : (
' '.$cssforamountpaymentcomplete)).
'">'.
price($resteapayer).
"</td></tr>\n";
686 print
'<div class="clearboth"></div>';
690 if ($action ==
'edit')
692 print
'<div align="center">';
693 print
'<input type="submit" class="button button-save" name="save" value="'.$langs->trans(
"Save").
'">';
695 print
'<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
699 if ($action ==
'edit') print
"</form>\n";
706 if ($action !=
'edit')
708 print
"<div class=\"tabsAction\">\n";
711 if ($object->paye && $user->rights->tax->charges->creer)
713 print
'<div class="inline-block divButAction"><a class="butAction" href="'.dol_buildpath(
"/compta/sociales/card.php", 1).
'?id='.$object->id.
'&action=reopen">'.$langs->trans(
"ReOpen").
'</a></div>';
717 if ($object->paye == 0 && $user->rights->tax->charges->creer)
719 print
'<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$object->id.
'&action=edit">'.$langs->trans(
"Modify").
'</a></div>';
723 if ($object->paye == 0 && ((
price2num($object->amount) < 0 &&
price2num($resteapayer,
'MT') < 0) || (
price2num($object->amount) > 0 &&
price2num($resteapayer,
'MT') > 0)) && $user->rights->tax->charges->creer)
725 print
"<div class=\"inline-block divButAction\"><a class=\"butAction\" href=\"".DOL_URL_ROOT.
"/compta/paiement_charge.php?id=$object->id&action=create\">".$langs->trans(
"DoPayment").
"</a></div>";
729 if ($object->paye == 0 && round($resteapayer) <= 0 && $user->rights->tax->charges->creer)
731 print
'<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$object->id.
'&action=paid&token='.
newToken().
'">'.$langs->trans(
"ClassifyPaid").
'</a></div>';
735 if ($user->rights->tax->charges->creer)
737 print
'<div class="inline-block divButAction"><a class="butAction" href="'.dol_buildpath(
"/compta/sociales/card.php", 1).
'?id='.$object->id.
'&action=clone">'.$langs->trans(
"ToClone").
"</a></div>";
741 if ($user->rights->tax->charges->supprimer)
743 print
'<div class="inline-block divButAction"><a class="butActionDelete" href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$object->id.
'&action=delete&token='.
newToken().
'">'.$langs->trans(
"Delete").
'</a></div>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
img_edit($titlealt= 'default', $float=0, $other= '')
Show logo editer/modifier fiche.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm= 'auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
Class to manage payments of social contributions.
Class to manage bank accounts.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage projects.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
print $_SERVER["PHP_SELF"]
Edit parameters.
tax_prepare_head(ChargeSociales $object)
Prepare array with list of tabs.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Class to manage accounting accounts.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.
dol_time_plus_duree($time, $duration_value, $duration_unit)
Add a delay to a date.
Classe permettant la gestion des paiements des charges La tva collectee n'est calculee que sur les fa...