29require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
41 public $element =
'chequereceipt';
46 public $table_element =
'bordereau_cheque';
51 public $picto =
'payment';
61 public $date_bordereau;
63 public $account_label;
72 const STATUS_DRAFT = 0;
73 const STATUS_VALIDATED = 1;
93 public function fetch($id, $ref =
'')
97 $sql =
"SELECT bc.rowid, bc.datec, bc.fk_user_author, bc.fk_bank_account, bc.amount, bc.ref, bc.statut, bc.nbcheque, bc.ref_ext,";
98 $sql .=
" bc.date_bordereau as date_bordereau, bc.type,";
99 $sql .=
" ba.label as account_label";
100 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bordereau_cheque as bc";
101 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank_account as ba ON bc.fk_bank_account = ba.rowid";
102 $sql .=
" WHERE bc.entity = ".$conf->entity;
104 $sql .=
" AND bc.rowid = ".((int) $id);
107 $sql .=
" AND bc.ref = '".$this->db->escape($ref).
"'";
111 $resql = $this->db->query($sql);
113 if ($obj = $this->db->fetch_object($resql)) {
114 $this->
id = $obj->rowid;
115 $this->amount = $obj->amount;
116 $this->date_bordereau = $this->db->jdate($obj->date_bordereau);
117 $this->account_id = $obj->fk_bank_account;
118 $this->account_label = $obj->account_label;
119 $this->author_id = $obj->fk_user_author;
120 $this->nbcheque = $obj->nbcheque;
121 $this->
statut = $obj->statut;
122 $this->ref_ext = $obj->ref_ext;
123 $this->
type = $obj->type;
126 $this->
ref =
"(PROV".$this->id.
")";
128 $this->
ref = $obj->ref;
131 $this->db->free($resql);
135 $this->error = $this->db->lasterror();
149 public function create($user, $account_id, $limit, $toRemise)
158 dol_syslog(
"RemiseCheque::Create start", LOG_DEBUG);
161 if (empty($this->
type)) {
167 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"bordereau_cheque (";
169 $sql .=
", date_bordereau";
170 $sql .=
", fk_user_author";
171 $sql .=
", fk_bank_account";
176 $sql .=
", nbcheque";
179 $sql .=
") VALUES (";
180 $sql .=
"'".$this->db->idate($now).
"'";
181 $sql .=
", '".$this->db->idate($now).
"'";
182 $sql .=
", ".((int) $user->id);
183 $sql .=
", ".((int) $account_id);
187 $sql .=
", ".((int) $conf->entity);
190 $sql .=
", '".$this->db->escape($this->
type).
"'";
193 $resql = $this->db->query($sql);
195 $this->
id = $this->db->last_insert_id(MAIN_DB_PREFIX.
"bordereau_cheque");
196 if ($this->
id == 0) {
197 $this->errno = -1024;
198 dol_syslog(
"Remisecheque::Create Error read id ".$this->errno, LOG_ERR);
201 if ($this->
id > 0 && $this->errno == 0) {
202 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
203 $sql .=
" SET ref = '(PROV".$this->id.
")'";
204 $sql .=
" WHERE rowid=".((int) $this->
id);
206 $resql = $this->db->query($sql);
208 $this->errno = -1025;
209 dol_syslog(
"RemiseCheque::Create Error update ".$this->errno, LOG_ERR);
215 if ($this->
id > 0 && $this->errno == 0) {
216 $sql =
"SELECT b.rowid";
217 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
218 $sql .=
" WHERE b.fk_type = '".$this->db->escape($this->
type).
"'";
219 $sql .=
" AND b.amount > 0";
220 $sql .=
" AND b.fk_bordereau = 0";
221 $sql .=
" AND b.fk_account = ".((int) $account_id);
223 $sql .= $this->db->plimit($limit);
226 dol_syslog(
"RemiseCheque::Create", LOG_DEBUG);
227 $resql = $this->db->query($sql);
229 while ($row = $this->db->fetch_row($resql)) {
230 array_push($lines, $row[0]);
232 $this->db->free($resql);
234 $this->errno = -1026;
235 dol_syslog(
"RemiseCheque::Create Error ".$this->errno, LOG_ERR);
239 if ($this->
id > 0 && $this->errno == 0) {
240 foreach ($lines as $lineid) {
241 $checkremise =
false;
242 foreach ($toRemise as $linetoremise) {
243 if ($linetoremise == $lineid) {
249 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
250 $sql .=
" SET fk_bordereau = ".((int) $this->
id);
251 $sql .=
" WHERE rowid = ".((int) $lineid);
253 $resql = $this->db->query($sql);
256 dol_syslog(
"RemiseCheque::Create Error update bank ".$this->errno, LOG_ERR);
262 if ($this->
id > 0 && $this->errno == 0) {
264 $this->errno = -1027;
265 dol_syslog(
"RemiseCheque::Create Error update amount ".$this->errno, LOG_ERR);
270 $this->error = $this->db->lasterror();
271 $this->errno = $this->db->lasterrno();
281 dol_syslog(
"RemiseCheque::Create end", LOG_DEBUG);
284 $this->db->rollback();
285 dol_syslog(
"RemiseCheque::Create end", LOG_DEBUG);
296 public function delete($user)
304 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"bordereau_cheque";
305 $sql .=
" WHERE rowid = ".((int) $this->
id);
306 $sql .=
" AND entity = ".$conf->entity;
308 $resql = $this->db->query($sql);
310 $num = $this->db->affected_rows($resql);
314 dol_syslog(
"Remisecheque::Delete Erreur Lecture ID ($this->errno)");
317 if ($this->errno === 0) {
318 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
319 $sql .=
" SET fk_bordereau = 0";
320 $sql .=
" WHERE fk_bordereau = ".((int) $this->
id);
322 $resql = $this->db->query($sql);
324 $this->errno = -1028;
325 dol_syslog(
"RemiseCheque::Delete ERREUR UPDATE ($this->errno)");
330 if ($this->errno === 0) {
333 $this->db->rollback();
334 dol_syslog(
"RemiseCheque::Delete ROLLBACK ($this->errno)");
348 global $langs, $conf;
356 if ($this->errno == 0 && $numref) {
357 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
358 $sql .=
" SET statut = 1, ref = '".$this->db->escape($numref).
"'";
359 $sql .=
" WHERE rowid = ".((int) $this->
id);
360 $sql .=
" AND entity = ".$conf->entity;
361 $sql .=
" AND statut = 0";
363 dol_syslog(
"RemiseCheque::Validate", LOG_DEBUG);
364 $resql = $this->db->query($sql);
366 $num = $this->db->affected_rows($resql);
369 $this->
ref = $numref;
372 $this->errno = -1029;
373 dol_syslog(
"Remisecheque::Validate Error ".$this->errno, LOG_ERR);
376 $this->errno = -1033;
377 dol_syslog(
"Remisecheque::Validate Error ".$this->errno, LOG_ERR);
382 if ($this->errno == 0) {
386 $this->db->rollback();
387 dol_syslog(
"RemiseCheque::Validate ".$this->errno, LOG_ERR);
401 global $conf, $db, $langs, $mysoc;
402 $langs->load(
"bills");
406 $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_mint';
408 $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_thyme';
410 $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_mint';
420 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
422 foreach ($dirmodels as $reldir) {
426 if (is_file($dir.$file) && is_readable($dir.$file)) {
427 $mybool = (include_once $dir.$file) || $mybool;
435 $classname = preg_replace(
'/\-.*$/',
'', $classname);
437 foreach ($conf->file->dol_document_root as $dirroot) {
438 $dir = $dirroot.
"/core/modules/cheque/";
441 if (is_file($dir.$file) && is_readable($dir.$file)) {
442 $mybool = (include_once $dir.$file) || $mybool;
452 $obj =
new $classname();
453 '@phan-var-force CommonNumRefGenerator $obj';
455 $numref = $obj->getNextValue($mysoc, $this);
461 if ($mode !=
'last' && !$numref) {
468 $langs->load(
"errors");
469 print $langs->trans(
"Error").
" ".$langs->trans(
"ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv(
"Bank"));
486 global $conf, $langs;
492 $sql =
"SELECT b.rowid, b.datev as datefin";
493 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
494 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
495 $sql .=
" WHERE b.fk_account = ba.rowid";
496 $sql .=
" AND ba.entity IN (".getEntity(
'bank_account').
")";
497 $sql .=
" AND b.fk_type = '".$this->db->escape($type).
"'";
498 $sql .=
" AND b.fk_bordereau = 0";
499 $sql .=
" AND b.amount > 0";
501 $resql = $this->db->query($sql);
503 $langs->load(
"banks");
507 $response->warning_delay = $conf->bank->cheque->warning_delay / 60 / 60 / 24;
508 $response->label = $langs->trans(
"BankChecksToReceipt");
509 $response->labelShort = $langs->trans(
"BankChecksToReceiptShort");
510 $response->url = DOL_URL_ROOT.
'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank';
513 while ($obj = $this->db->fetch_object($resql)) {
516 if ($this->db->jdate($obj->datefin) < ($now - $conf->bank->cheque->warning_delay)) {
517 $response->nbtodolate++;
524 $this->error = $this->db->error();
544 $sql =
"SELECT count(b.rowid) as nb";
545 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
546 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
547 $sql .=
" WHERE b.fk_account = ba.rowid";
548 $sql .=
" AND ba.entity IN (".getEntity(
'bank_account').
")";
549 $sql .=
" AND b.fk_type = '".$this->db->escape($type).
"'";
550 $sql .=
" AND b.amount > 0";
552 $resql = $this->db->query($sql);
554 while ($obj = $this->db->fetch_object($resql)) {
555 $this->nb[
"cheques"] = $obj->nb;
557 $this->db->free($resql);
561 $this->error = $this->db->error();
576 global $langs, $conf;
582 dol_syslog(
"RemiseCheque::generatePdf model=".$model.
" id=".$this->id, LOG_DEBUG);
584 $dir = DOL_DOCUMENT_ROOT.
"/core/modules/cheque/doc/";
587 $file =
"pdf_".$model.
".class.php";
588 if (file_exists($dir.$file)) {
589 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
590 include_once $dir.$file;
592 $classname =
'BordereauCheque'.ucfirst($model);
593 $docmodel =
new $classname($this->db);
594 '@phan-var-force CommonDocGenerator $module';
596 $sql =
"SELECT b.banque, b.emetteur, b.amount, b.num_chq";
597 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
598 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
599 $sql .=
", ".MAIN_DB_PREFIX.
"bordereau_cheque as bc";
600 $sql .=
" WHERE b.fk_account = ba.rowid";
601 $sql .=
" AND b.fk_bordereau = bc.rowid";
602 $sql .=
" AND bc.rowid = ".((int) $this->
id);
603 $sql .=
" AND bc.entity = ".$conf->entity;
604 $sql .=
" ORDER BY b.dateo ASC, b.rowid ASC";
606 dol_syslog(
"RemiseCheque::generatePdf", LOG_DEBUG);
607 $result = $this->db->query($sql);
610 while ($objp = $this->db->fetch_object($result)) {
611 $docmodel->lines[$i] =
new stdClass();
612 $docmodel->lines[$i]->bank_chq = $objp->banque;
613 $docmodel->lines[$i]->emetteur_chq = $objp->emetteur;
614 $docmodel->lines[$i]->amount_chq = $objp->amount;
615 $docmodel->lines[$i]->num_chq = $objp->num_chq;
619 $docmodel->nbcheque = $this->nbcheque;
620 $docmodel->ref = $this->ref;
621 $docmodel->amount = $this->amount;
622 $docmodel->date = $this->date_bordereau;
624 $account =
new Account($this->db);
625 $account->fetch($this->account_id);
627 $docmodel->account = &$account;
631 $sav_charset_output = $outputlangs->charset_output;
633 $result = $docmodel->write_file($this, $conf->bank->dir_output.
'/checkdeposits', $this->ref, $outputlangs);
644 $this->error = $langs->trans(
"ErrorFileDoesNotExists", $dir.$file);
663 $sql =
"SELECT amount ";
664 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank";
665 $sql .=
" WHERE fk_bordereau = ".((int) $this->
id);
667 $resql = $this->db->query($sql);
669 while ($row = $this->db->fetch_row($resql)) {
674 $this->db->free($resql);
676 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
677 $sql .=
" SET amount = ".price2num($total);
678 $sql .=
", nbcheque = ".((int) $nb);
679 $sql .=
" WHERE rowid = ".((int) $this->
id);
680 $sql .=
" AND entity = ".((int) $conf->entity);
682 $resql = $this->db->query($sql);
684 $this->errno = -1030;
685 dol_syslog(
"RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)");
688 $this->errno = -1031;
689 dol_syslog(
"RemiseCheque::updateAmount ERREUR SELECT ($this->errno)");
692 if ($this->errno === 0) {
695 $this->db->rollback();
696 dol_syslog(
"RemiseCheque::updateAmount ROLLBACK ($this->errno)");
713 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
714 $sql .=
" SET fk_bordereau = 0";
715 $sql .=
" WHERE rowid = ".((int) $account_id);
716 $sql .=
" AND fk_bordereau = ".((int) $this->
id);
718 $resql = $this->db->query($sql);
722 $this->errno = -1032;
723 dol_syslog(
"RemiseCheque::removeCheck ERREUR UPDATE ($this->errno)");
742 $payment->fetch(0, 0, $bank_id);
745 $bankline->fetch($bank_id);
759 $bankaccount = $payment->fk_account;
762 $sql =
'SELECT pf.fk_facture, pf.amount';
763 $sql .=
' FROM '.MAIN_DB_PREFIX.
'paiement_facture as pf';
764 $sql .=
' WHERE pf.fk_paiement = '.((int) $payment->id);
766 $resql = $this->db->query($sql);
768 $rejectedPayment =
new Paiement($this->db);
769 $rejectedPayment->amounts = array();
770 $rejectedPayment->datepaye = $rejection_date;
771 $rejectedPayment->paiementid =
dol_getIdFromCode($this->db,
'CHQ',
'c_paiement',
'code',
'id', 1);
772 $rejectedPayment->num_payment = $payment->num_payment;
774 while ($obj = $this->db->fetch_object($resql)) {
775 $invoice =
new Facture($this->db);
776 $invoice->fetch($obj->fk_facture);
777 $invoice->setUnpaid($user);
779 $rejectedPayment->amounts[$obj->fk_facture] =
price2num($obj->amount) * -1;
782 $result = $rejectedPayment->create($user);
785 $result = $rejectedPayment->addPaymentToBank($user,
'payment',
'(CheckRejected)', $bankaccount,
'',
'');
787 $result = $payment->reject();
790 return $rejectedPayment->id;
792 $this->db->rollback();
796 $this->error = $rejectedPayment->error;
797 $this->errors = $rejectedPayment->errors;
798 $this->db->rollback();
802 $this->error = $rejectedPayment->error;
803 $this->errors = $rejectedPayment->errors;
804 $this->db->rollback();
808 $this->error = $this->db->lasterror();
809 $this->db->rollback();
825 if ($user->hasRight(
'banque',
'cheque')) {
826 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
827 $sql .=
" SET date_bordereau = ".($date ?
"'".$this->db->idate($date).
"'" :
'null');
828 $sql .=
" WHERE rowid = ".((int) $this->
id);
830 dol_syslog(
"RemiseCheque::set_date", LOG_DEBUG);
831 $resql = $this->db->query($sql);
833 $this->date_bordereau = $date;
836 $this->error = $this->db->error();
855 if ($user->hasRight(
'banque',
'cheque')) {
856 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
857 $sql .=
" SET ref = '".$this->db->escape($ref).
"'";
858 $sql .=
" WHERE rowid = ".((int) $this->
id);
860 dol_syslog(
"RemiseCheque::set_number", LOG_DEBUG);
861 $resql = $this->db->query($sql);
865 $this->error = $this->db->error();
883 global $user, $langs, $conf;
887 $nownotime =
dol_mktime(0, 0, 0, $arraynow[
'mon'], $arraynow[
'mday'], $arraynow[
'year']);
891 $this->
ref =
'SPECIMEN';
893 $this->date_bordereau = $nownotime;
908 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
910 global $conf, $langs;
914 $label =
'<u>'.$langs->trans(
"ShowCheckReceipt").
'</u>';
916 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
918 $url = DOL_URL_ROOT.
'/compta/paiement/cheque/card.php?id='.$this->id;
920 if ($option !=
'nolink') {
922 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
923 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
924 $add_save_lastsearch_values = 1;
926 if ($add_save_lastsearch_values) {
927 $url .=
'&save_lastsearch_values=1';
932 if (empty($notooltip)) {
934 $label = $langs->trans(
"ShowCheckReceipt");
935 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
937 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
938 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
940 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
943 $linkstart =
'<a href="'.$url.
'"';
944 $linkstart .= $linkclose.
'>';
947 $result .= $linkstart;
949 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
951 if ($withpicto != 2) {
952 $result .= $this->ref;
981 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
983 $langs->load(
'compta');
984 $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'ToValidate');
985 $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
986 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'ToValidate');
987 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
990 $statusType =
'status'.$status;
991 if ($status == self::STATUS_VALIDATED) {
992 $statusType =
'status4';
995 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
1009 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1011 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1012 $return .=
'<div class="info-box info-box-sm">';
1013 $return .=
'<span class="info-box-icon bg-infobox-action">';
1015 $return .=
'</span>';
1016 $return .=
'<div class="info-box-content">';
1017 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
1018 if ($selected >= 0) {
1019 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1021 if (property_exists($this,
'date_bordereau')) {
1022 $return .=
'<br><span class="opacitymedium">'.$langs->trans(
"DateCreation").
'</span> : <span class="info-box-label">'.
dol_print_date($this->db->jdate($this->date_bordereau),
'day').
'</span>';
1024 if (property_exists($this,
'nbcheque')) {
1025 $return .=
'<br><span class="opacitymedium">'.$langs->trans(
"Cheque",
'',
'',
'',
'', 5).
'</span> : <span class="info-box-label">'.$this->nbcheque.
'</span>';
1027 if (property_exists($this,
'account_id')) {
1028 $return .=
' | <span class="info-box-label">'.$this->account_id.
'</span>';
1030 if (method_exists($this,
'LibStatut')) {
1031 $return .=
'<br><div style="display:inline-block" class="info-box-status margintoponly">'.$this->getLibStatut(3).
'</div>';
1033 if (property_exists($this,
'amount')) {
1034 $return .=
' | <div style="display:inline-block"><span class="opacitymedium">'.$langs->trans(
"Amount").
'</span> : <span class="amount">'.
price($this->amount).
'</div>';
1036 $return .=
'</div>';
1037 $return .=
'</div>';
1038 $return .=
'</div>';
Class to manage bank accounts.
Class to manage bank transaction lines.
Parent class of all other business classes (invoices, contracts, proposals, orders,...
Class to manage invoices.
Class to manage payments of customer invoices.
Class to manage cheque delivery receipts.
removeCheck($account_id)
Insere la remise en base.
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return clicable name (with picto eventually)
$errno
Numero d'erreur Plage 1024-1279.
getKanbanView($option='', $arraydata=null)
Return clicable link of object (with eventually picto)
generatePdf($model, $outputlangs)
Build document.
LibStatut($status, $mode=0)
Return the label of a given status.
__construct($db)
Constructor.
getLibStatut($mode=0)
Return the label of the status.
set_date($user, $date)
Set the creation date.
rejectCheck($bank_id, $rejection_date)
Check return management Reopen linked invoices and create a new negative payment.
validate($user)
Validate a receipt.
set_number($user, $ref)
Set the ref of bordereau.
load_board($user, $type='CHQ')
Load indicators for dashboard (this->nbtodo and this->nbtodolate)
getNextNumRef($mode='next')
Return next reference of cheque receipts not already used (or last reference) according to numbering ...
fetch($id, $ref='')
Load record.
loadStateBoard($type='CHQ')
Load indicators this->nb for the state board.
create($user, $account_id, $limit, $toRemise)
Create a receipt to send cheques.
updateAmount()
Mets a jour le montant total.
initAsSpecimen($option='')
Initialise an instance with random values.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
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.
dol_getIdFromCode($db, $key, $tablename, $fieldkey='code', $fieldid='id', $entityfilter=0, $filters='')
Return an id or code from a code or id.
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_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
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