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 =
'';
96 public $amounts = array();
101 public $fk_typepayment;
107 public $num_paiement;
128 public $fk_user_author;
133 public $fk_user_modif;
148 public $bank_account;
158 public $fields = array(
159 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'enabled' => 1,
'visible' => 0,
'notnull' => 1,
'index' => 1,
'position' => 1,
'comment' =>
'Id'),
160 'ref' => array(
'type' =>
'varchar(128)',
'label' =>
'Ref',
'enabled' => 1,
'position' => 10,
'visible' => 1,
'index' => 1,
'comment' =>
"Reference of object"),
161 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'visible' => 0,
'notnull' => 1,
'position' => 20),
162 'datec' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'visible' => 0,
'position' => 30),
163 'datep' => array(
'type' =>
'date',
'label' =>
'Date',
'enabled' => 1,
'visible' => 0,
'position' => 40,
'comment' =>
'Date'),
164 'datev' => array(
'type' =>
'date',
'label' =>
'Date',
'enabled' => 1,
'visible' => 0,
'position' => 50,
'comment' =>
'Date'),
165 'fk_user' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'Employee',
'enabled' => 1,
'position' => 60,
'notnull' => 1,
'visible' => 1,
'picto' =>
'user'),
166 'salary' => array(
'type' =>
'double(24,8)',
'label' =>
'salary',
'enabled' => 1,
'visible' => 0,
'position' => 70),
167 'amount' => array(
'type' =>
'double(24,8)',
'label' =>
'Amount',
'enabled' => 1,
'visible' => 1,
'notnull' => 1,
'position' => 80),
168 'fk_projet' => array(
'type' =>
'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)',
'label' =>
'Project',
'enabled' =>
"isModEnabled('project')",
'visible' => 0,
'position' => 90),
169 'fk_typepayment' => array(
'type' =>
'typepayment',
'label' =>
'DefaultPaymentMode',
'enabled' => 1,
'visible' => 1,
'position' => 100,
'comment' =>
'Payment type'),
170 'num_payment' => array(
'type' =>
'string',
'label' =>
'Reference',
'enabled' => 1,
'visible' => 0,
'position' => 110,
'comment' =>
'Reference'),
171 'label' => array(
'type' =>
'varchar(255)',
'label' =>
'Label',
'enabled' => 1,
'position' => 120,
'notnull' => 0,
'visible' => 1),
172 'datesp' => array(
'type' =>
'date',
'label' =>
'DateStart',
'enabled' => 1,
'visible' => 1,
'position' => 130,
'comment' =>
'Date'),
173 'dateep' => array(
'type' =>
'date',
'label' =>
'DateEnd',
'enabled' => 1,
'visible' => 1,
'position' => 140,
'comment' =>
'Date'),
174 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'default' =>
'1',
'enabled' => 1,
'visible' => 0,
'position' => 150,
'index' => 1),
175 'note' => array(
'type' =>
'text',
'label' =>
'Note',
'enabled' => 1,
'position' => 160,
'visible' => 0,),
176 'fk_bank' => array(
'type' =>
'integer',
'label' =>
'BankId',
'enabled' => 1,
'visible' => 0,
'position' => 170),
177 'paye' => array(
'type' =>
'smallint(6)',
'label' =>
'Status',
'enabled' => 1,
'visible' => 1,
'notnull' => 1,
'position' => 180),
178 'fk_user_author' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserAuthor',
'enabled' => 1,
'visible' => 0,
'position' => 190),
179 'fk_user_modif' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserModif',
'enabled' => 1,
'position' => 200,
'visible' => 0,),
180 'ref_ext' => array(
'type' =>
'varchar(128)',
'label' =>
'Ref ext',
'enabled' => 1,
'visible' => 0,
'position' => 210),
181 'note_public' => array(
'type' =>
'text',
'label' =>
'NotePublic',
'enabled' => 1,
'visible' => 0,
'position' => 220),
202 public function create($user, $closepaidcontrib = 0)
210 dol_syslog(get_class($this).
"::create", LOG_DEBUG);
213 if (!empty($this->datepaye) && empty($this->datep)) {
214 dol_syslog(__METHOD__.
": using datepaye is deprecated, please use datep instead", LOG_WARNING);
215 $this->datep = $this->datepaye;
219 if (empty($this->datep)) {
220 $this->error =
'ErrorBadValueForParameterCreatePaymentSalary';
225 if (isset($this->fk_salary)) {
226 $this->fk_salary = (int) $this->fk_salary;
228 if (isset($this->amount)) {
229 $this->amount = (float) $this->amount;
231 if (isset($this->fk_typepayment)) {
232 $this->fk_typepayment = (int) $this->fk_typepayment;
234 if (isset($this->num_paiement)) {
235 $this->num_paiement = trim($this->num_paiement);
237 if (isset($this->num_payment)) {
238 $this->num_payment = trim($this->num_payment);
240 if (isset($this->note)) {
241 $this->note = trim($this->note);
243 if (isset($this->fk_bank)) {
244 $this->fk_bank = (int) $this->fk_bank;
246 if (isset($this->fk_user_author)) {
247 $this->fk_user_author = (int) $this->fk_user_author;
249 if (isset($this->fk_user_modif)) {
250 $this->fk_user_modif = (int) $this->fk_user_modif;
254 foreach ($this->amounts as $key => $value) {
255 $newvalue = (float)
price2num($value,
'MT');
256 $this->amounts[$key] = $newvalue;
257 $totalamount += $newvalue;
261 $totalamount = (float)
price2num($totalamount,
'MT');
262 if ($totalamount == 0) {
269 if ($totalamount != 0) {
271 foreach ($this->amounts as $key => $amount) {
273 if (is_numeric($amount) && !empty($amount)) {
275 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"payment_salary (entity, fk_salary, datec, datep, amount,";
276 $sql .=
" fk_typepayment, num_payment, note, fk_user_author, fk_bank)";
277 $sql .=
" VALUES (".((int) $conf->entity).
", ".((int) $salary_id).
", '".$this->db->idate($now).
"',";
278 $sql .=
" '".$this->db->idate($this->datep).
"',";
279 $sql .=
" ".((float) $amount).
",";
280 $sql .=
" ".((int) $this->fk_typepayment).
", '".$this->db->escape($this->num_payment).
"', '".$this->db->escape($this->note).
"', ".((int) $user->id).
",";
283 $resql = $this->db->query($sql);
285 $this->
id = $this->db->last_insert_id(MAIN_DB_PREFIX.
"payment_salary");
289 if ($closepaidcontrib) {
290 $tmpsalary =
new Salary($this->db);
291 $tmpsalary->fetch($salary_id);
292 $paiement = $tmpsalary->getSommePaiement();
297 $alreadypayed =
price2num($paiement + $creditnotes + $deposits,
'MT');
298 $remaintopay =
price2num($tmpsalary->amount - $paiement - $creditnotes - $deposits,
'MT');
299 if ($remaintopay == 0) {
300 $result = $tmpsalary->setPaid($user);
302 dol_syslog(
"Remain to pay for salary id=".$salary_id.
" not null. We do nothing.");
309 $result = $this->
call_trigger(
'PAYMENTSALARY_CREATE', $user);
314 if ($totalamount != 0 && !$error) {
315 $this->amount = $totalamount;
316 $this->total = $totalamount;
320 $this->error = $this->db->error();
321 $this->db->rollback();
337 $sql .=
" t.fk_salary,";
341 $sql .=
" t.amount,";
342 $sql .=
" t.fk_typepayment,";
343 $sql .=
" t.num_payment as num_payment,";
345 $sql .=
" t.fk_bank,";
346 $sql .=
" t.fk_user_author,";
347 $sql .=
" t.fk_user_modif,";
348 $sql .=
" pt.code as type_code, pt.libelle as type_label,";
349 $sql .=
' b.fk_account';
350 $sql .=
" FROM ".MAIN_DB_PREFIX.
"payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as pt ON t.fk_typepayment = pt.id";
351 $sql .=
' LEFT JOIN '.MAIN_DB_PREFIX.
'bank as b ON t.fk_bank = b.rowid';
352 $sql .=
" WHERE t.rowid = ".((int) $id);
355 dol_syslog(get_class($this).
"::fetch", LOG_DEBUG);
356 $resql = $this->db->query($sql);
358 if ($this->db->num_rows($resql)) {
359 $obj = $this->db->fetch_object($resql);
361 $this->
id = $obj->rowid;
362 $this->
ref = $obj->rowid;
364 $this->fk_salary = $obj->fk_salary;
365 $this->datec = $this->db->jdate($obj->datec);
366 $this->tms = $this->db->jdate($obj->tms);
367 $this->datepaye = $this->db->jdate($obj->datep);
368 $this->amount = $obj->amount;
369 $this->fk_typepayment = $obj->fk_typepayment;
370 $this->num_paiement = $obj->num_payment;
371 $this->num_payment = $obj->num_payment;
372 $this->note = $obj->note;
373 $this->note_private = $obj->note;
374 $this->fk_bank = $obj->fk_bank;
375 $this->fk_user_author = $obj->fk_user_author;
376 $this->fk_user_modif = $obj->fk_user_modif;
378 $this->type_code = $obj->type_code;
379 $this->type_label = $obj->type_label;
381 $this->bank_account = $obj->fk_account;
382 $this->bank_line = $obj->fk_bank;
384 $this->db->free($resql);
388 $this->error =
"Error ".$this->db->lasterror();
401 public function update($user =
null, $notrigger = 0)
403 global $conf, $langs;
408 if (isset($this->fk_salary)) {
409 $this->fk_salary = (int) $this->fk_salary;
411 if (isset($this->amount)) {
412 $this->amount = (float) $this->amount;
414 if (isset($this->fk_typepayment)) {
415 $this->fk_typepayment = (int) $this->fk_typepayment;
417 if (isset($this->num_paiement)) {
418 $this->num_paiement = trim($this->num_paiement);
420 if (isset($this->num_payment)) {
421 $this->num_payment = trim($this->num_payment);
423 if (isset($this->note)) {
424 $this->note = trim($this->note);
426 if (isset($this->fk_bank)) {
427 $this->fk_bank = (int) $this->fk_bank;
429 if (isset($this->fk_user_author)) {
430 $this->fk_user_author = (int) $this->fk_user_author;
432 if (isset($this->fk_user_modif)) {
433 $this->fk_user_modif = (int) $this->fk_user_modif;
440 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"payment_salary SET";
441 $sql .=
" fk_salary=".(isset($this->fk_salary) ? $this->fk_salary :
"null").
",";
442 $sql .=
" datec=".(dol_strlen($this->datec) != 0 ?
"'".$this->db->idate($this->datec).
"'" :
'null').
",";
443 $sql .=
" tms=".(dol_strlen($this->tms) != 0 ?
"'".$this->db->idate($this->tms).
"'" :
'null').
",";
444 $sql .=
" datep=".(dol_strlen($this->datepaye) != 0 ?
"'".$this->db->idate($this->datepaye).
"'" :
'null').
",";
445 $sql .=
" amount=".(isset($this->amount) ? $this->amount :
"null").
",";
446 $sql .=
" fk_typepayment=".(isset($this->fk_typepayment) ? $this->fk_typepayment :
"null").
",";
447 $sql .=
" num_payment=".(isset($this->num_payment) ?
"'".$this->db->escape($this->num_payment).
"'" :
"null").
",";
448 $sql .=
" note=".(isset($this->note) ?
"'".$this->db->escape($this->note).
"'" :
"null").
",";
449 $sql .=
" fk_bank=".(isset($this->fk_bank) ? ((int) $this->fk_bank) :
"null").
",";
450 $sql .=
" fk_user_author=".(isset($this->fk_user_author) ? ((int) $this->fk_user_author) :
"null").
",";
451 $sql .=
" fk_user_modif=".(isset($this->fk_user_modif) ? ((int) $this->fk_user_modif) :
"null");
452 $sql .=
" WHERE rowid=".((int) $this->
id);
456 dol_syslog(get_class($this).
"::update", LOG_DEBUG);
457 $resql = $this->db->query($sql);
460 $this->errors[] =
"Error ".$this->db->lasterror();
465 foreach ($this->errors as $errmsg) {
466 dol_syslog(get_class($this).
"::update ".$errmsg, LOG_ERR);
467 $this->error .= ($this->error ?
', '.$errmsg : $errmsg);
469 $this->db->rollback();
485 public function delete($user, $notrigger = 0)
493 if ($this->bank_line > 0) {
495 $accline->fetch($this->bank_line);
496 $result = $accline->delete($user);
498 $this->errors[] = $accline->error;
504 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"payment_salary";
505 $sql .=
" WHERE rowid=".((int) $this->
id);
507 dol_syslog(get_class($this).
"::delete", LOG_DEBUG);
508 $resql = $this->db->query($sql);
511 $this->errors[] =
"Error ".$this->db->lasterror();
517 foreach ($this->errors as $errmsg) {
518 dol_syslog(get_class($this).
"::delete ".$errmsg, LOG_ERR);
519 $this->error .= ($this->error ?
', '.$errmsg : $errmsg);
521 $this->db->rollback();
555 $object->context[
'createfromclone'] =
'createfromclone';
556 $result =
$object->create($user);
564 unset(
$object->context[
'createfromclone']);
571 $this->db->rollback();
587 $this->fk_salary = 0;
592 $this->fk_typepayment = 0;
593 $this->num_payment =
'';
594 $this->note_private =
'';
595 $this->note_public =
'';
597 $this->fk_user_author = 0;
598 $this->fk_user_modif = 0;
616 public function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque)
621 $this->num_payment = trim($this->num_payment ? $this->num_payment : $this->num_paiement);
625 if (isModEnabled(
"bank")) {
626 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
629 $acc->fetch($accountid);
634 $bank_line_id = $acc->addline(
636 $this->fk_typepayment,
650 if ($bank_line_id > 0) {
659 if ($mode ==
'payment_salary') {
660 $url = DOL_URL_ROOT.
'/salaries/payment_salary/card.php?id=';
664 $result = $acc->add_url_line($bank_line_id, $this->
id, $url,
'(paiement)', $mode);
672 foreach ($this->amounts as $key => $value) {
674 if ($mode ==
'payment_salary') {
675 $salary =
new Salary($this->db);
676 $salary->fetch($key);
677 $salary->fetch_user($salary->fk_user);
679 $fuser = $salary->user;
681 if ($fuser->id > 0) {
682 $result = $acc->add_url_line(
685 DOL_URL_ROOT.
'/user/card.php?id=',
686 $fuser->getFullName($langs),
691 $this->error = $this->db->lasterror();
692 dol_syslog(get_class($this) .
'::addPaymentToBank ' . $this->error);
699 $this->error = $acc->error;
722 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"payment_salary SET fk_bank = ".((int) $id_bank).
" WHERE rowid = ".((int) $this->
id);
724 dol_syslog(get_class($this).
"::update_fk_bank", LOG_DEBUG);
725 $result = $this->db->query($sql);
729 $this->error = $this->db->error();
748 dol_syslog(get_class($this).
"::updatePaymentDate with date = ".$date, LOG_DEBUG);
750 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
751 $sql .=
" SET datep = '".$this->db->idate($date).
"'";
752 $sql .=
" WHERE rowid = ".((int) $this->
id);
754 $result = $this->db->query($sql);
757 $this->error =
'Error -1 '.$this->db->error();
760 $type = $this->element;
762 $sql =
"UPDATE ".MAIN_DB_PREFIX.
'bank';
763 $sql .=
" SET dateo = '".$this->db->idate($date).
"', datev = '".$this->db->idate($date).
"'";
764 $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).
")";
765 $sql .=
" AND rappro = 0";
767 $result = $this->db->query($sql);
770 $this->error =
'Error -1 '.$this->db->error();
777 $this->datepaye = $date;
782 $this->db->rollback();
813 $langs->load(
'compta');
862 public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
864 global $conf, $langs, $hookmanager;
868 if (!empty($conf->dol_no_mouse_hover)) {
875 'objecttype' => $this->element.($this->module ?
'@'.$this->module :
''),
878 $classfortooltip =
'classfortooltip';
881 $classfortooltip =
'classforajaxtooltip';
882 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
888 $url = DOL_URL_ROOT.
'/salaries/payment_salary/card.php?id='.$this->id;
890 if ($option !==
'nolink') {
892 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
893 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
894 $add_save_lastsearch_values = 1;
896 if ($url && $add_save_lastsearch_values) {
897 $url .=
'&save_lastsearch_values=1';
902 if (empty($notooltip)) {
904 $label = $langs->trans(
"SalaryPayment");
905 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
907 $linkclose .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
908 $linkclose .= $dataparams.
' class="'.$classfortooltip.($morecss ?
' '.$morecss :
'').
'"';
910 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
913 if ($option ==
'nolink' || empty($url)) {
914 $linkstart =
'<span';
916 $linkstart =
'<a href="'.$url.
'"';
918 $linkstart .= $linkclose.
'>';
919 if ($option ==
'nolink' || empty($url)) {
920 $linkend =
'</span>';
925 $result .= $linkstart;
927 if (empty($this->showphoto_on_popup)) {
929 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), (($withpicto != 2) ?
'class="paddingright"' :
''), 0, 0, $notooltip ? 0 : 1);
933 if ($withpicto != 2) {
934 $result .= $this->ref;
940 global $action, $hookmanager;
941 $hookmanager->initHooks(array($this->element.
'dao'));
942 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
943 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
945 $result = $hookmanager->resPrint;
947 $result .= $hookmanager->resPrint;
961 global $conf, $langs, $user;
963 $langs->load(
'salaries');
967 return [
'optimize' => $langs->trans(
"SalaryPayment")];
970 if ($user->hasRight(
'salaries',
'read')) {
971 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u class="paddingrightonly">'.$langs->trans(
"SalaryPayment").
'</u>';
972 if (isset($this->
status)) {
973 $datas[
'status'] =
' '.$this->getLibStatut(5);
975 $datas[
'Ref'] =
'<br><b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
976 if (!empty($this->total_ttc)) {
977 $datas[
'AmountTTC'] =
'<br><b>'.$langs->trans(
'AmountTTC').
':</b> '.
price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
979 if (!empty($this->datep)) {
980 $datas[
'Date'] =
'<br><b>'.$langs->trans(
'Date').
':</b> '.
dol_print_date($this->datep,
'dayhour',
'tzuserrel');
981 } elseif (!empty($this->datepaye)) {
982 $datas[
'Date'] =
'<br><b>'.$langs->trans(
'Date').
':</b> '.
dol_print_date($this->datepaye,
'dayhour',
'tzuserrel');
1000 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1002 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1003 $return .=
'<div class="info-box info-box-sm">';
1004 $return .=
'<span class="info-box-icon bg-infobox-action">';
1006 $return .=
'</span>';
1007 $return .=
'<div class="info-box-content">';
1008 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl(1) : $this->ref).
'</span>';
1009 if ($selected >= 0) {
1010 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1012 if (property_exists($this,
'fk_bank') && is_numeric($this->fk_bank)) {
1013 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
1015 $account->fetch($this->fk_bank);
1016 $return .=
' | <span class="info-box-label">'.$account->getNomUrl(1).
'</span>';
1018 if (property_exists($this,
'fk_user_author') && is_numeric($this->fk_user_author)) {
1019 $userstatic =
new User($this->db);
1020 $userstatic->fetch($this->fk_user_author);
1021 $return .=
'<br><span class="info-box-status">'.$userstatic->getNomUrl(1).
'</span>';
1024 if (property_exists($this,
'fk_typepayment')) {
1025 $return .=
'<br><span class="opacitymedium">'.$langs->trans(
"PaymentMode").
'</span> : <span class="info-box-label">'.$this->fk_typepayment.
'</span>';
1027 if (property_exists($this,
'amount')) {
1028 $return .=
'<br><span class="opacitymedium">'.$langs->trans(
"Amount").
'</span> : <span class="info-box-label amount">'.
price($this->amount).
'</span>';
1030 $return .=
'</div>';
1031 $return .=
'</div>';
1032 $return .=
'</div>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
print $langs trans("AuditedSecurityEvents").'</strong >< span class="opacitymedium"></span >< br > status
Or an array listing all the potential status of the object: array: int of the status => translated la...
Class to manage bank accounts.
Class to manage bank transaction lines.
Parent class of all other business classes (invoices, contracts, proposals, orders,...
call_trigger($triggerName, $user)
Call trigger based on this instance.
Class to manage payments of salaries.
LibStatut($status, $mode=0)
Return the status.
update_fk_bank($id_bank)
Mise a jour du lien entre le paiement de salaire et la ligne dans llx_bank generee.
updatePaymentDate($date)
Updates the payment date.
getLibStatut($mode=0)
Return the label of the status.
initAsSpecimen()
Initialise an instance with random values.
getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return clicable name (with picto eventually)
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.
getKanbanView($option='', $arraydata=null)
Return clicable 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.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
price2num($amount, $rounding='', $option=0)
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.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
publicphonebutton2 phonegreen basiclayout basiclayout TotalHT VATCode TotalVAT TotalLT1 TotalLT2 TotalTTC TotalHT clearboth nowraponall TAKEPOS_SHOW_SUBPRICE right right right takeposterminal SELECT e e e e e statut