29require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
41 public $element =
'payment_salary';
46 public $table_element =
'payment_salary';
51 public $picto =
'payment';
75 public $datepaye =
'';
97 public $amounts = array();
102 public $fk_typepayment;
125 public $fk_user_author;
130 public $fk_user_modif;
145 public $bank_account;
155 public $fields = array(
156 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'enabled' => 1,
'visible' => 0,
'notnull' => 1,
'index' => 1,
'position' => 1,
'comment' =>
'Id'),
157 'ref' => array(
'type' =>
'varchar(128)',
'label' =>
'Ref',
'enabled' => 1,
'position' => 10,
'visible' => 1,
'index' => 1,
'comment' =>
"Reference of object"),
158 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'visible' => 0,
'notnull' => 1,
'position' => 20),
159 'datec' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'visible' => 0,
'position' => 30),
160 'datep' => array(
'type' =>
'date',
'label' =>
'Date',
'enabled' => 1,
'visible' => 0,
'position' => 40,
'comment' =>
'Date'),
161 'datev' => array(
'type' =>
'date',
'label' =>
'Date',
'enabled' => 1,
'visible' => 0,
'position' => 50,
'comment' =>
'Date'),
162 'fk_user' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'Employee',
'enabled' => 1,
'position' => 60,
'notnull' => 1,
'visible' => 1,
'picto' =>
'user'),
163 'salary' => array(
'type' =>
'double(24,8)',
'label' =>
'salary',
'enabled' => 1,
'visible' => 0,
'position' => 70),
164 'amount' => array(
'type' =>
'double(24,8)',
'label' =>
'Amount',
'enabled' => 1,
'visible' => 1,
'notnull' => 1,
'position' => 80),
165 'fk_projet' => array(
'type' =>
'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)',
'label' =>
'Project',
'enabled' =>
"isModEnabled('project')",
'visible' => 0,
'position' => 90),
166 'fk_typepayment' => array(
'type' =>
'typepayment',
'label' =>
'DefaultPaymentMode',
'enabled' => 1,
'visible' => 1,
'position' => 100,
'comment' =>
'Payment type'),
167 'num_payment' => array(
'type' =>
'string',
'label' =>
'Reference',
'enabled' => 1,
'visible' => 0,
'position' => 110,
'comment' =>
'Reference'),
168 'label' => array(
'type' =>
'varchar(255)',
'label' =>
'Label',
'enabled' => 1,
'position' => 120,
'notnull' => 0,
'visible' => 1),
169 'datesp' => array(
'type' =>
'date',
'label' =>
'DateStart',
'enabled' => 1,
'visible' => 1,
'position' => 130,
'comment' =>
'Date'),
170 'dateep' => array(
'type' =>
'date',
'label' =>
'DateEnd',
'enabled' => 1,
'visible' => 1,
'position' => 140,
'comment' =>
'Date'),
171 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'default' =>
'1',
'enabled' => 1,
'visible' => 0,
'position' => 150,
'index' => 1),
172 'note' => array(
'type' =>
'text',
'label' =>
'Note',
'enabled' => 1,
'position' => 160,
'visible' => 0,),
173 'fk_bank' => array(
'type' =>
'integer',
'label' =>
'BankId',
'enabled' => 1,
'visible' => 0,
'position' => 170),
174 'paye' => array(
'type' =>
'smallint(6)',
'label' =>
'Status',
'enabled' => 1,
'visible' => 1,
'notnull' => 1,
'position' => 180),
175 'fk_user_author' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserAuthor',
'enabled' => 1,
'visible' => 0,
'position' => 190),
176 'fk_user_modif' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserModif',
'enabled' => 1,
'position' => 200,
'visible' => 0,),
177 'ref_ext' => array(
'type' =>
'varchar(128)',
'label' =>
'RefExt',
'enabled' => 1,
'visible' => 0,
'position' => 210),
178 'note_public' => array(
'type' =>
'text',
'label' =>
'NotePublic',
'enabled' => 1,
'visible' => 0,
'position' => 220),
199 public function create($user, $closepaidcontrib = 0)
207 dol_syslog(get_class($this).
"::create", LOG_DEBUG);
210 if (!empty($this->datepaye) && empty($this->datep)) {
211 dol_syslog(__METHOD__.
": using datepaye is deprecated, please use datep instead", LOG_WARNING);
212 $this->datep = $this->datepaye;
216 if (empty($this->datep)) {
217 $this->error =
'ErrorBadValueForParameterCreatePaymentSalary';
222 if (isset($this->fk_salary)) {
223 $this->fk_salary = (int) $this->fk_salary;
225 if (isset($this->
amount)) {
228 if (isset($this->fk_typepayment)) {
229 $this->fk_typepayment = (int) $this->fk_typepayment;
231 if (isset($this->num_payment)) {
232 $this->num_payment = trim($this->num_payment);
234 if (isset($this->note)) {
235 $this->note = trim($this->note);
237 if (isset($this->fk_bank)) {
238 $this->fk_bank = (int) $this->fk_bank;
240 if (isset($this->fk_user_author)) {
241 $this->fk_user_author = (int) $this->fk_user_author;
243 if (isset($this->fk_user_modif)) {
244 $this->fk_user_modif = (int) $this->fk_user_modif;
248 foreach ($this->amounts as $key => $value) {
249 $newvalue = (float)
price2num($value,
'MT');
250 $this->amounts[$key] = $newvalue;
251 $totalamount += $newvalue;
255 $totalamount = (float)
price2num($totalamount,
'MT');
256 if ($totalamount == 0) {
263 if ($totalamount != 0) {
265 foreach ($this->amounts as $key => $amount) {
267 if (is_numeric($amount) && !empty($amount)) {
269 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"payment_salary (entity, fk_salary, datec, datep, amount,";
270 $sql .=
" fk_typepayment, num_payment, note, fk_user_author, fk_bank)";
271 $sql .=
" VALUES (".((int)
$conf->entity).
", ".((int) $salary_id).
", '".$this->db->idate($now).
"',";
272 $sql .=
" '".$this->db->idate($this->datep).
"',";
273 $sql .=
" ".((float) $amount).
",";
274 $sql .=
" ".((int) $this->fk_typepayment).
", '".$this->db->escape($this->num_payment).
"', '".$this->db->escape($this->note).
"', ".((int) $user->id).
",";
277 $resql = $this->db->query($sql);
279 $this->
id = $this->db->last_insert_id(MAIN_DB_PREFIX.
"payment_salary");
283 if ($closepaidcontrib) {
284 $tmpsalary =
new Salary($this->db);
285 $tmpsalary->fetch($salary_id);
286 $paiement = $tmpsalary->getSommePaiement();
291 $alreadypayed =
price2num($paiement + $creditnotes + $deposits,
'MT');
292 $remaintopay =
price2num((
float) $tmpsalary->amount - $paiement - $creditnotes - $deposits,
'MT');
293 if ($remaintopay == 0) {
294 $result = $tmpsalary->setPaid($user);
296 dol_syslog(
"Remain to pay for salary id=".$salary_id.
" not null. We do nothing.");
304 $result = $this->call_trigger(
'PAYMENTSALARY_CREATE', $user);
310 if ($totalamount != 0 && !$error) {
311 $this->
amount = $totalamount;
312 $this->total = $totalamount;
316 $this->error = $this->db->error();
317 $this->db->rollback();
333 $sql .=
" t.fk_salary,";
337 $sql .=
" t.amount,";
338 $sql .=
" t.fk_typepayment,";
339 $sql .=
" t.num_payment as num_payment,";
341 $sql .=
" t.fk_bank as bank_line,";
342 $sql .=
" t.fk_user_author,";
343 $sql .=
" t.fk_user_modif,";
344 $sql .=
" pt.code as type_code, pt.libelle as type_label,";
345 $sql .=
' b.fk_account';
346 $sql .=
" FROM ".MAIN_DB_PREFIX.
"payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as pt ON t.fk_typepayment = pt.id";
347 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank as b ON t.fk_bank = b.rowid';
348 $sql .=
" WHERE t.rowid = ".((int) $id);
351 dol_syslog(get_class($this).
"::fetch", LOG_DEBUG);
352 $resql = $this->db->query($sql);
354 if ($this->db->num_rows($resql)) {
355 $obj = $this->db->fetch_object($resql);
357 $this->
id = $obj->rowid;
358 $this->
ref = $obj->rowid;
360 $this->fk_salary = $obj->fk_salary;
361 $this->datec = $this->db->jdate($obj->datec);
362 $this->tms = $this->db->jdate($obj->tms);
363 $this->datepaye = $this->db->jdate($obj->datep);
364 $this->datep = $this->db->jdate($obj->datep);
365 $this->
amount = $obj->amount;
366 $this->fk_typepayment = $obj->fk_typepayment;
367 $this->num_payment = $obj->num_payment;
368 $this->note = $obj->note;
369 $this->note_private = $obj->note;
370 $this->fk_user_author = $obj->fk_user_author;
371 $this->fk_user_modif = $obj->fk_user_modif;
372 $this->user_modification_id = $obj->fk_user_modif;
374 $this->type_code = $obj->type_code;
375 $this->type_label = $obj->type_label;
377 $this->bank_account = $obj->fk_account;
378 $this->fk_account = $obj->fk_account;
380 $this->fk_bank = $obj->bank_line;
381 $this->bank_line = $obj->bank_line;
383 $this->db->free($resql);
387 $this->error =
"Error ".$this->db->lasterror();
400 public function update($user =
null, $notrigger = 0)
402 global
$conf, $langs;
407 if (isset($this->fk_salary)) {
408 $this->fk_salary = (int) $this->fk_salary;
410 if (isset($this->
amount)) {
413 if (isset($this->fk_typepayment)) {
414 $this->fk_typepayment = (int) $this->fk_typepayment;
416 if (isset($this->num_payment)) {
417 $this->num_payment = trim($this->num_payment);
419 if (isset($this->note)) {
420 $this->note = trim($this->note);
422 if (isset($this->fk_bank)) {
423 $this->fk_bank = (int) $this->fk_bank;
425 if (isset($this->fk_user_author)) {
426 $this->fk_user_author = (int) $this->fk_user_author;
428 if (isset($this->fk_user_modif)) {
429 $this->fk_user_modif = (int) $this->fk_user_modif;
436 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"payment_salary SET";
437 $sql .=
" fk_salary=".(isset($this->fk_salary) ? ((int) $this->fk_salary) :
"null").
",";
438 $sql .=
" datec=".(dol_strlen($this->datec) != 0 ?
"'".$this->db->idate($this->datec).
"'" :
'null').
",";
439 $sql .=
" tms=".(dol_strlen((
string) $this->tms) != 0 ?
"'".$this->db->idate($this->tms).
"'" :
'null').
",";
440 $sql .=
" datep=".(dol_strlen($this->datepaye) != 0 ?
"'".$this->db->idate($this->datepaye).
"'" :
'null').
",";
441 $sql .=
" amount=".(isset($this->
amount) ? ((float) $this->
amount) :
"null").
",";
442 $sql .=
" fk_typepayment=".(isset($this->fk_typepayment) ? ((int) $this->fk_typepayment) :
"null").
",";
443 $sql .=
" num_payment=".(isset($this->num_payment) ?
"'".$this->db->escape($this->num_payment).
"'" :
"null").
",";
444 $sql .=
" note=".(isset($this->note) ?
"'".$this->db->escape($this->note).
"'" :
"null").
",";
445 $sql .=
" fk_bank=".(isset($this->fk_bank) ? ((int) $this->fk_bank) :
"null").
",";
446 $sql .=
" fk_user_author=".(isset($this->fk_user_author) ? ((int) $this->fk_user_author) :
"null").
",";
447 $sql .=
" fk_user_modif=".(isset($this->fk_user_modif) ? ((int) $this->fk_user_modif) :
"null");
448 $sql .=
" WHERE rowid=".((int) $this->
id);
452 dol_syslog(get_class($this).
"::update", LOG_DEBUG);
453 $resql = $this->db->query($sql);
456 $this->errors[] =
"Error ".$this->db->lasterror();
459 if (!$error && $user && !$notrigger) {
461 $result = $this->call_trigger(
'PAYMENTSALARY_MODIFY', $user);
470 foreach ($this->errors as $errmsg) {
471 dol_syslog(get_class($this).
"::update ".$errmsg, LOG_ERR);
472 $this->error .= ($this->error ?
', '.$errmsg : $errmsg);
474 $this->db->rollback();
490 public function delete($user, $notrigger = 0)
498 if ($this->bank_line > 0) {
500 $accline->fetch((
int) $this->bank_line);
501 $result = $accline->delete($user);
509 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"payment_salary";
510 $sql .=
" WHERE rowid=".((int) $this->
id);
512 dol_syslog(get_class($this).
"::delete", LOG_DEBUG);
513 $resql = $this->db->query($sql);
516 $this->errors[] =
"Error ".$this->db->lasterror();
520 if (!$error && !$notrigger) {
522 $result = $this->call_trigger(
'PAYMENTSALARY_DELETE', $user);
531 foreach ($this->errors as $errmsg) {
532 dol_syslog(get_class($this).
"::delete ".$errmsg, LOG_ERR);
533 $this->error .= ($this->error ?
', '.$errmsg : $errmsg);
535 $this->db->rollback();
569 $object->context[
'createfromclone'] =
'createfromclone';
570 $result =
$object->create($user);
578 unset(
$object->context[
'createfromclone']);
585 $this->db->rollback();
601 $this->fk_salary = 0;
606 $this->fk_typepayment = 0;
607 $this->num_payment =
'';
608 $this->note_private =
'';
609 $this->note_public =
'';
611 $this->fk_user_author = 0;
612 $this->fk_user_modif = 0;
630 public function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque)
635 $this->num_payment = trim((
string) $this->num_payment);
640 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
643 $acc->fetch($accountid);
645 $total = $this->amount;
648 $bank_line_id = $acc->addline(
650 (
string) $this->fk_typepayment,
664 if ($bank_line_id > 0) {
668 dol_print_error($this->db);
673 if ($mode ==
'payment_salary') {
674 $url = DOL_URL_ROOT.
'/salaries/payment_salary/card.php?id=';
678 $result = $acc->add_url_line($bank_line_id, $this->
id, $url,
'(paiement)', $mode);
681 dol_print_error($this->db);
686 foreach ($this->amounts as $key => $value) {
688 if ($mode ==
'payment_salary') {
689 $salary =
new Salary($this->db);
690 $salary->fetch($key);
691 $salary->fetch_user($salary->fk_user);
693 $fuser = $salary->user;
695 if ($fuser->id > 0) {
696 $result = $acc->add_url_line(
699 DOL_URL_ROOT.
'/user/card.php?id=',
700 $fuser->getFullName($langs),
705 $this->error = $this->db->lasterror();
706 dol_syslog(get_class($this) .
'::addPaymentToBank ' . $this->error);
713 $this->error = $acc->error;
736 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"payment_salary SET fk_bank = ".((int) $id_bank).
" WHERE rowid = ".((int) $this->
id);
738 dol_syslog(get_class($this).
"::update_fk_bank", LOG_DEBUG);
739 $result = $this->db->query($sql);
743 $this->error = $this->db->error();
762 dol_syslog(get_class($this).
"::updatePaymentDate with date = ".$date, LOG_DEBUG);
764 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
765 $sql .=
" SET datep = '".$this->db->idate($date).
"'";
766 $sql .=
" WHERE rowid = ".((int) $this->
id);
768 $result = $this->db->query($sql);
771 $this->error =
'Error -1 '.$this->db->error();
774 $type = $this->element;
776 $sql =
"UPDATE ".MAIN_DB_PREFIX.
'bank';
777 $sql .=
" SET dateo = '".$this->db->idate($date).
"', datev = '".$this->db->idate($date).
"'";
778 $sql .=
" WHERE rowid IN (SELECT fk_bank FROM ".MAIN_DB_PREFIX.
"bank_url WHERE type = '".$this->db->escape($type).
"' AND url_id = ".((int) $this->
id).
")";
779 $sql .=
" AND rappro = 0";
781 $result = $this->db->query($sql);
784 $this->error =
'Error -1 '.$this->db->error();
788 $this->datepaye = $date;
793 $this->db->rollback();
808 return $this->
LibStatut($this->statut, $mode);
824 $langs->load(
'compta');
874 public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1, $option =
'')
876 global
$conf, $langs, $hookmanager;
878 if (!empty(
$conf->dol_no_mouse_hover)) {
885 'objecttype' => $this->element.($this->module ?
'@'.$this->module :
''),
888 $classfortooltip =
'classfortooltip';
891 $classfortooltip =
'classforajaxtooltip';
892 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
898 $url = DOL_URL_ROOT.
'/salaries/payment_salary/card.php?id='.$this->id;
912 if (empty($notooltip)) {
914 $label = $langs->trans(
"SalaryPayment");
915 $linkclose .=
' alt="'.dolPrintHTMLForAttribute($label).
'"';
917 $linkclose .= ($label ?
' title="'.dolPrintHTMLForAttribute($label).
'"' :
' title="tocomplete"');
918 $linkclose .= $dataparams.
' class="'.$classfortooltip.($morecss ?
' '.$morecss :
'').
'"';
920 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
923 if ($option ==
'nolink') {
924 $linkstart =
'<span';
926 $linkstart =
'<a href="'.$url.
'"';
928 $linkstart .= $linkclose.
'>';
929 if ($option ==
'nolink') {
930 $linkend =
'</span>';
935 $result .= $linkstart;
937 if (empty($this->showphoto_on_popup)) {
939 $result .= img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), (($withpicto != 2) ?
'class="paddingright"' :
''), 0, 0, $notooltip ? 0 : 1);
943 if ($withpicto != 2) {
944 $result .= $this->ref;
950 global $action, $hookmanager;
951 $hookmanager->initHooks(array($this->element.
'dao'));
952 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
953 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
955 $result = $hookmanager->resPrint;
957 $result .= $hookmanager->resPrint;
971 global
$conf, $langs, $user;
973 $langs->load(
'salaries');
977 return [
'optimize' => $langs->trans(
"SalaryPayment")];
980 if ($user->hasRight(
'salaries',
'read')) {
981 $datas[
'picto'] = img_picto(
'', $this->picto).
' <u class="paddingrightonly">'.$langs->trans(
"SalaryPayment").
'</u>';
982 if (isset($this->
status)) {
983 $datas[
'status'] =
' '.$this->getLibStatut(5);
985 $datas[
'Ref'] =
'<br><b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
986 if (!empty($this->total_ttc)) {
987 $datas[
'AmountTTC'] =
'<br><b>'.$langs->trans(
'AmountTTC').
':</b> '.
price($this->total_ttc, 0, $langs, 0, -1, -1,
$conf->currency);
989 if (!empty($this->datep)) {
990 $datas[
'Date'] =
'<br><b>'.$langs->trans(
'Date').
':</b> '.
dol_print_date($this->datep,
'dayhour',
'tzuserrel');
991 } elseif (!empty($this->datepaye)) {
992 $datas[
'Date'] =
'<br><b>'.$langs->trans(
'Date').
':</b> '.
dol_print_date($this->datepaye,
'dayhour',
'tzuserrel');
1010 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1012 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1013 $return .=
'<div class="info-box info-box-sm">';
1014 $return .=
'<span class="info-box-icon bg-infobox-action">';
1015 $return .= img_picto(
'', $this->picto);
1016 $return .=
'</span>';
1017 $return .=
'<div class="info-box-content">';
1018 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->
getNomUrl(1) .
'</span>';
1019 if ($selected >= 0) {
1020 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1022 if (!empty($this->fk_bank) && is_numeric($this->fk_bank)) {
1023 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
1025 $account->fetch($this->fk_bank);
1026 $return .=
' | <span class="info-box-label">'.$account->getNomUrl(1).
'</span>';
1028 if (!empty($this->fk_user_author) && is_numeric($this->fk_user_author)) {
1029 $userstatic =
new User($this->db);
1030 $userstatic->fetch($this->fk_user_author);
1031 $return .=
'<br><span class="info-box-status">'.$userstatic->getNomUrl(1).
'</span>';
1034 if (!empty($this->fk_typepayment)) {
1035 $return .=
'<br><span class="opacitymedium">'.$langs->trans(
"PaymentMode").
'</span> : <span class="info-box-label">'.$this->fk_typepayment.
'</span>';
1037 $return .=
'<br><span class="opacitymedium">'.$langs->trans(
"Amount").
'</span> : <span class="info-box-label amount">'.
price($this->
amount).
'</span>';
1038 $return .=
'</div>';
1039 $return .=
'</div>';
1040 $return .=
'</div>';
if(! $sortfield) if(! $sortorder) $object
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
Class to manage bank accounts.
Class to manage bank transaction lines.
setErrorsFromObject($object)
setErrorsFromObject
Class to manage payments of salaries.
LibStatut($status, $mode=0)
Return the status.
update_fk_bank($id_bank)
Update the relation between the salary paiment and the line generated in llx_bank.
updatePaymentDate($date)
Updates the payment date.
getLibStatut($mode=0)
Return the label of the status.
initAsSpecimen()
Initialise an instance with random values.
create($user, $closepaidcontrib=0)
Create payment of salary into database.
__construct($db)
Constructor.
update($user=null, $notrigger=0)
Update database.
getTooltipContentArray($params)
getTooltipContentArray
addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque)
Add record into bank for payment with links between this bank record and invoices of payment.
getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $morecss='', $save_lastsearch_value=-1, $option='')
Return clickable name (with picto eventually)
getKanbanView($option='', $arraydata=null)
Return clickable link of object (with eventually picto)
fetch($id)
Load object in memory from database.
createFromClone(User $user, $fromid)
Load an object from its id and create a new one in database.
Class to manage salary payments.
Class to manage Dolibarr users.
print $langs trans("Ref").' m titre as m m statut as status
Or an array listing all the potential status of the object: array: int of the status => translated la...
dol_now($mode='gmt')
Return date for now.
price2num($amount, $rounding='', $option=0, $currencycode='')
Function that return a number with universal decimal format (decimal separator is '.
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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
print $langs trans('Date')." left Ref Label right Qty right Price right TotalHT right TotalTTC right right right right right right right right right centpercent right TotalHT right n right VAT right n right TotalVAT right n No sujeto a RE IRPF right TotalLT1 right n right TotalLT2 right n right TotalTTC right n takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency takeposcustomercurrency right TotalTTC takeposcustomercurrency right takeposcustomercurrency n right Paid right PaymentTypeShortLIQ right SELECT p pos_change as p datep as p p num_paiement as f pf amount as amount