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)");
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 = ".((int) $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;
373 $this->errno = -1029;
374 dol_syslog(
"Remisecheque::validate Error ".$this->errno, LOG_ERR);
377 $this->errno = -1033;
378 $this->error = $this->db->lasterror();
379 dol_syslog(
"Remisecheque::validate Error ".$this->errno, LOG_ERR);
384 if ($this->errno == 0) {
388 $this->db->rollback();
389 dol_syslog(
"RemiseCheque::Validate ".$this->errno, LOG_ERR);
403 global $conf, $db, $langs, $mysoc;
404 $langs->load(
"bills");
408 $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_mint';
410 $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_thyme';
412 $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_mint';
422 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
424 foreach ($dirmodels as $reldir) {
428 if (is_file($dir.$file) && is_readable($dir.$file)) {
429 $mybool = (include_once $dir.$file) || $mybool;
437 $classname = preg_replace(
'/\-.*$/',
'', $classname);
439 foreach ($conf->file->dol_document_root as $dirroot) {
440 $dir = $dirroot.
"/core/modules/cheque/";
443 if (is_file($dir.$file) && is_readable($dir.$file)) {
444 $mybool = (include_once $dir.$file) || $mybool;
454 $obj =
new $classname();
455 '@phan-var-force CommonNumRefGenerator $obj';
457 $numref = $obj->getNextValue($mysoc, $this);
463 if ($mode !=
'last' && !$numref) {
470 $langs->load(
"errors");
471 print $langs->trans(
"Error").
" ".$langs->trans(
"ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv(
"Bank"));
488 global $conf, $langs;
494 $sql =
"SELECT b.rowid, b.datev as datefin";
495 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
496 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
497 $sql .=
" WHERE b.fk_account = ba.rowid";
498 $sql .=
" AND ba.entity IN (".getEntity(
'bank_account').
")";
499 $sql .=
" AND b.fk_type = '".$this->db->escape($type).
"'";
500 $sql .=
" AND b.fk_bordereau = 0";
501 $sql .=
" AND b.amount > 0";
503 $resql = $this->db->query($sql);
505 $langs->load(
"banks");
509 $response->warning_delay = $conf->bank->cheque->warning_delay / 60 / 60 / 24;
510 $response->label = $langs->trans(
"BankChecksToReceipt");
511 $response->labelShort = $langs->trans(
"BankChecksToReceiptShort");
512 $response->url = DOL_URL_ROOT.
'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank';
515 while ($obj = $this->db->fetch_object($resql)) {
518 if ($this->db->jdate($obj->datefin) < ($now - $conf->bank->cheque->warning_delay)) {
519 $response->nbtodolate++;
526 $this->error = $this->db->error();
546 $sql =
"SELECT count(b.rowid) as nb";
547 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
548 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
549 $sql .=
" WHERE b.fk_account = ba.rowid";
550 $sql .=
" AND ba.entity IN (".getEntity(
'bank_account').
")";
551 $sql .=
" AND b.fk_type = '".$this->db->escape($type).
"'";
552 $sql .=
" AND b.amount > 0";
554 $resql = $this->db->query($sql);
556 while ($obj = $this->db->fetch_object($resql)) {
557 $this->nb[
"cheques"] = $obj->nb;
559 $this->db->free($resql);
563 $this->error = $this->db->error();
578 global $langs, $conf;
584 dol_syslog(
"RemiseCheque::generatePdf model=".$model.
" id=".$this->id, LOG_DEBUG);
586 $dir = DOL_DOCUMENT_ROOT.
"/core/modules/cheque/doc/";
589 $file =
"pdf_".$model.
".class.php";
590 if (file_exists($dir.$file)) {
591 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
592 include_once $dir.$file;
594 $classname =
'BordereauCheque'.ucfirst($model);
595 $docmodel =
new $classname($this->db);
596 '@phan-var-force CommonDocGenerator $module';
598 $sql =
"SELECT b.banque, b.emetteur, b.amount, b.num_chq";
599 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
600 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
601 $sql .=
", ".MAIN_DB_PREFIX.
"bordereau_cheque as bc";
602 $sql .=
" WHERE b.fk_account = ba.rowid";
603 $sql .=
" AND b.fk_bordereau = bc.rowid";
604 $sql .=
" AND bc.rowid = ".((int) $this->
id);
605 $sql .=
" AND bc.entity = ".$conf->entity;
606 $sql .=
" ORDER BY b.dateo ASC, b.rowid ASC";
608 dol_syslog(
"RemiseCheque::generatePdf", LOG_DEBUG);
609 $result = $this->db->query($sql);
612 while ($objp = $this->db->fetch_object($result)) {
613 $docmodel->lines[$i] =
new stdClass();
614 $docmodel->lines[$i]->bank_chq = $objp->banque;
615 $docmodel->lines[$i]->emetteur_chq = $objp->emetteur;
616 $docmodel->lines[$i]->amount_chq = $objp->amount;
617 $docmodel->lines[$i]->num_chq = $objp->num_chq;
621 $docmodel->nbcheque = $this->nbcheque;
622 $docmodel->ref = $this->ref;
623 $docmodel->amount = $this->amount;
624 $docmodel->date = $this->date_bordereau;
626 $account =
new Account($this->db);
627 $account->fetch($this->account_id);
629 $docmodel->account = &$account;
633 $sav_charset_output = $outputlangs->charset_output;
635 $result = $docmodel->write_file($this, $conf->bank->dir_output.
'/checkdeposits', $this->ref, $outputlangs);
646 $this->error = $langs->trans(
"ErrorFileDoesNotExists", $dir.$file);
665 $sql =
"SELECT amount ";
666 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank";
667 $sql .=
" WHERE fk_bordereau = ".((int) $this->
id);
669 $resql = $this->db->query($sql);
671 while ($row = $this->db->fetch_row($resql)) {
676 $this->db->free($resql);
678 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
679 $sql .=
" SET amount = ".price2num($total);
680 $sql .=
", nbcheque = ".((int) $nb);
681 $sql .=
" WHERE rowid = ".((int) $this->
id);
682 $sql .=
" AND entity = ".((int) $conf->entity);
684 $resql = $this->db->query($sql);
686 $this->errno = -1030;
687 dol_syslog(
"RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)");
690 $this->errno = -1031;
691 dol_syslog(
"RemiseCheque::updateAmount ERREUR SELECT ($this->errno)");
694 if ($this->errno === 0) {
697 $this->db->rollback();
698 dol_syslog(
"RemiseCheque::updateAmount ROLLBACK ($this->errno)");
715 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
716 $sql .=
" SET fk_bordereau = 0";
717 $sql .=
" WHERE rowid = ".((int) $account_id);
718 $sql .=
" AND fk_bordereau = ".((int) $this->
id);
720 $resql = $this->db->query($sql);
724 $this->errno = -1032;
725 dol_syslog(
"RemiseCheque::removeCheck ERREUR UPDATE ($this->errno)");
744 $payment->fetch(0, 0, $bank_id);
747 $bankline->fetch($bank_id);
761 $bankaccount = $payment->fk_account;
764 $sql =
'SELECT pf.fk_facture, pf.amount';
765 $sql .=
' FROM '.MAIN_DB_PREFIX.
'paiement_facture as pf';
766 $sql .=
' WHERE pf.fk_paiement = '.((int) $payment->id);
768 $resql = $this->db->query($sql);
770 $rejectedPayment =
new Paiement($this->db);
771 $rejectedPayment->amounts = array();
772 $rejectedPayment->datepaye = $rejection_date;
773 $rejectedPayment->paiementid =
dol_getIdFromCode($this->db,
'CHQ',
'c_paiement',
'code',
'id', 1);
774 $rejectedPayment->num_payment = $payment->num_payment;
776 while ($obj = $this->db->fetch_object($resql)) {
777 $invoice =
new Facture($this->db);
778 $invoice->fetch($obj->fk_facture);
779 $invoice->setUnpaid($user);
781 $rejectedPayment->amounts[$obj->fk_facture] =
price2num($obj->amount) * -1;
784 $result = $rejectedPayment->create($user);
787 $result = $rejectedPayment->addPaymentToBank($user,
'payment',
'(CheckRejected)', $bankaccount,
'',
'');
789 $result = $payment->reject();
792 return $rejectedPayment->id;
794 $this->db->rollback();
798 $this->error = $rejectedPayment->error;
799 $this->errors = $rejectedPayment->errors;
800 $this->db->rollback();
804 $this->error = $rejectedPayment->error;
805 $this->errors = $rejectedPayment->errors;
806 $this->db->rollback();
810 $this->error = $this->db->lasterror();
811 $this->db->rollback();
827 if ($user->hasRight(
'banque',
'cheque')) {
828 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
829 $sql .=
" SET date_bordereau = ".($date ?
"'".$this->db->idate($date).
"'" :
'null');
830 $sql .=
" WHERE rowid = ".((int) $this->
id);
832 dol_syslog(
"RemiseCheque::set_date", LOG_DEBUG);
833 $resql = $this->db->query($sql);
835 $this->date_bordereau = $date;
838 $this->error = $this->db->error();
857 if ($user->hasRight(
'banque',
'cheque')) {
858 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
859 $sql .=
" SET ref = '".$this->db->escape($ref).
"'";
860 $sql .=
" WHERE rowid = ".((int) $this->
id);
862 dol_syslog(
"RemiseCheque::set_number", LOG_DEBUG);
863 $resql = $this->db->query($sql);
867 $this->error = $this->db->error();
885 global $user, $langs, $conf;
889 $nownotime =
dol_mktime(0, 0, 0, $arraynow[
'mon'], $arraynow[
'mday'], $arraynow[
'year']);
893 $this->
ref =
'SPECIMEN';
895 $this->date_bordereau = $nownotime;
910 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
912 global $conf, $langs;
916 $label =
'<u>'.$langs->trans(
"ShowCheckReceipt").
'</u>';
918 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
920 $url = DOL_URL_ROOT.
'/compta/paiement/cheque/card.php?id='.$this->id;
922 if ($option !=
'nolink') {
924 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
925 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
926 $add_save_lastsearch_values = 1;
928 if ($add_save_lastsearch_values) {
929 $url .=
'&save_lastsearch_values=1';
934 if (empty($notooltip)) {
936 $label = $langs->trans(
"ShowCheckReceipt");
937 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
939 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
940 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
942 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
945 $linkstart =
'<a href="'.$url.
'"';
946 $linkstart .= $linkclose.
'>';
949 $result .= $linkstart;
951 $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);
953 if ($withpicto != 2) {
954 $result .= $this->ref;
983 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
985 $langs->load(
'compta');
986 $this->labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'ToValidate');
987 $this->labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
988 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv(
'ToValidate');
989 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv(
'Validated');
992 $statusType =
'status'.$status;
993 if ($status == self::STATUS_VALIDATED) {
994 $statusType =
'status4';
997 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
1011 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1013 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1014 $return .=
'<div class="info-box info-box-sm">';
1015 $return .=
'<span class="info-box-icon bg-infobox-action">';
1017 $return .=
'</span>';
1018 $return .=
'<div class="info-box-content">';
1019 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
1020 if ($selected >= 0) {
1021 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1023 if (property_exists($this,
'date_bordereau')) {
1024 $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>';
1026 if (property_exists($this,
'nbcheque')) {
1027 $return .=
'<br><span class="opacitymedium">'.$langs->trans(
"Cheque",
'',
'',
'',
'', 5).
'</span> : <span class="info-box-label">'.$this->nbcheque.
'</span>';
1029 if (property_exists($this,
'account_id')) {
1030 $return .=
' | <span class="info-box-label">'.$this->account_id.
'</span>';
1032 if (method_exists($this,
'LibStatut')) {
1033 $return .=
'<br><div style="display:inline-block" class="info-box-status margintoponly">'.$this->getLibStatut(3).
'</div>';
1035 if (property_exists($this,
'amount')) {
1036 $return .=
' | <div style="display:inline-block"><span class="opacitymedium">'.$langs->trans(
"Amount").
'</span> : <span class="amount">'.
price($this->amount).
'</div>';
1038 $return .=
'</div>';
1039 $return .=
'</div>';
1040 $return .=
'</div>';
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,...
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