27 require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
28 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
39 public $element =
'chequereceipt';
44 public $table_element =
'bordereau_cheque';
49 public $picto =
'payment';
57 public $date_bordereau;
59 public $account_label;
68 const STATUS_DRAFT = 0;
69 const STATUS_VALIDATED = 1;
81 $this->previous_id = 0;
91 public function fetch($id, $ref =
'')
95 $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";
96 $sql .=
", bc.date_bordereau as date_bordereau";
97 $sql .=
", ba.label as account_label";
98 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bordereau_cheque as bc";
99 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank_account as ba ON bc.fk_bank_account = ba.rowid";
100 $sql .=
" WHERE bc.entity = ".$conf->entity;
101 if ($id) $sql .=
" AND bc.rowid = ".((int) $id);
102 if ($ref) $sql .=
" AND bc.ref = '".$this->db->escape($ref).
"'";
108 if ($obj = $this->
db->fetch_object(
$resql))
110 $this->
id = $obj->rowid;
111 $this->amount = $obj->amount;
112 $this->date_bordereau = $this->
db->jdate($obj->date_bordereau);
113 $this->account_id = $obj->fk_bank_account;
114 $this->account_label = $obj->account_label;
115 $this->author_id = $obj->fk_user_author;
116 $this->nbcheque = $obj->nbcheque;
117 $this->
statut = $obj->statut;
118 $this->ref_ext = $obj->ref_ext;
122 $this->ref =
"(PROV".$this->id.
")";
124 $this->ref = $obj->ref;
131 $this->error = $this->
db->lasterror();
145 public function create($user, $account_id, $limit, $toRemise)
154 dol_syslog(
"RemiseCheque::Create start", LOG_DEBUG);
158 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"bordereau_cheque (";
160 $sql .=
", date_bordereau";
161 $sql .=
", fk_user_author";
162 $sql .=
", fk_bank_account";
167 $sql .=
", nbcheque";
169 $sql .=
") VALUES (";
170 $sql .=
"'".$this->db->idate($now).
"'";
171 $sql .=
", '".$this->db->idate($now).
"'";
172 $sql .=
", ".$user->id;
173 $sql .=
", ".$account_id;
177 $sql .=
", ".$conf->entity;
185 $this->
id = $this->
db->last_insert_id(MAIN_DB_PREFIX.
"bordereau_cheque");
188 $this->errno = -1024;
189 dol_syslog(
"Remisecheque::Create Error read id ".$this->errno, LOG_ERR);
192 if ($this->
id > 0 && $this->errno == 0)
194 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
195 $sql .=
" SET ref='(PROV".$this->id.
")'";
196 $sql .=
" WHERE rowid=".$this->id.
"";
201 $this->errno = -1025;
202 dol_syslog(
"RemiseCheque::Create Error update ".$this->errno, LOG_ERR);
206 if ($this->
id > 0 && $this->errno == 0)
209 $sql =
"SELECT b.rowid";
210 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
211 $sql .=
" WHERE b.fk_type = 'CHQ'";
212 $sql .=
" AND b.amount > 0";
213 $sql .=
" AND b.fk_bordereau = 0";
214 $sql .=
" AND b.fk_account = ".((int) $account_id);
215 if ($limit) $sql .= $this->
db->plimit($limit);
217 dol_syslog(
"RemiseCheque::Create", LOG_DEBUG);
221 while ($row = $this->
db->fetch_row(
$resql))
223 array_push($lines, $row[0]);
227 $this->errno = -1026;
228 dol_syslog(
"RemiseCheque::Create Error ".$this->errno, LOG_ERR);
232 if ($this->
id > 0 && $this->errno == 0)
234 foreach ($lines as $lineid)
236 $checkremise =
false;
237 foreach ($toRemise as $linetoremise)
239 if ($linetoremise == $lineid) $checkremise =
true;
244 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
245 $sql .=
" SET fk_bordereau = ".$this->id;
246 $sql .=
" WHERE rowid = ".$lineid;
252 dol_syslog(
"RemiseCheque::Create Error update bank ".$this->errno, LOG_ERR);
258 if ($this->
id > 0 && $this->errno == 0)
262 $this->errno = -1027;
263 dol_syslog(
"RemiseCheque::Create Error update amount ".$this->errno, LOG_ERR);
268 $this->error = $this->
db->lasterror();
269 $this->errno = $this->
db->lasterrno();
272 if (!$this->errno && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS))
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 =
'')
303 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"bordereau_cheque";
304 $sql .=
" WHERE rowid = ".$this->id;
305 $sql .=
" AND entity = ".$conf->entity;
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 = ".$this->id;
325 $this->errno = -1028;
326 dol_syslog(
"RemiseCheque::Delete ERREUR UPDATE ($this->errno)");
331 if ($this->errno === 0)
335 $this->
db->rollback();
336 dol_syslog(
"RemiseCheque::Delete ROLLBACK ($this->errno)");
350 global $langs, $conf;
358 if ($this->errno == 0 && $numref)
360 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
361 $sql .=
" SET statut = 1, ref = '".$this->db->escape($numref).
"'";
362 $sql .=
" WHERE rowid = ".$this->id;
363 $sql .=
" AND entity = ".$conf->entity;
364 $sql .=
" AND statut = 0";
366 dol_syslog(
"RemiseCheque::Validate", LOG_DEBUG);
370 $num = $this->
db->affected_rows(
$resql);
374 $this->ref = $numref;
377 $this->errno = -1029;
378 dol_syslog(
"Remisecheque::Validate Error ".$this->errno, LOG_ERR);
381 $this->errno = -1033;
382 dol_syslog(
"Remisecheque::Validate Error ".$this->errno, LOG_ERR);
387 if ($this->errno == 0)
392 $this->
db->rollback();
393 dol_syslog(
"RemiseCheque::Validate ".$this->errno, LOG_ERR);
407 global $conf, $db, $langs, $mysoc;
408 $langs->load(
"bills");
411 if (empty($conf->global->CHEQUERECEIPTS_ADDON)) $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_mint';
412 elseif ($conf->global->CHEQUERECEIPTS_ADDON ==
'thyme') $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_thyme';
413 elseif ($conf->global->CHEQUERECEIPTS_ADDON ==
'mint') $conf->global->CHEQUERECEIPTS_ADDON =
'mod_chequereceipt_mint';
415 if (!empty($conf->global->CHEQUERECEIPTS_ADDON))
419 $file = $conf->global->CHEQUERECEIPTS_ADDON.
".php";
420 $classname = $conf->global->CHEQUERECEIPTS_ADDON;
423 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
425 foreach ($dirmodels as $reldir) {
429 if (is_file($dir.$file) && is_readable($dir.$file))
431 $mybool |= include_once $dir.$file;
438 $file = $conf->global->CHEQUERECEIPTS_ADDON.
".php";
439 $classname =
"mod_chequereceipt_".$conf->global->CHEQUERECEIPTS_ADDON;
440 $classname = preg_replace(
'/\-.*$/',
'', $classname);
442 foreach ($conf->file->dol_document_root as $dirroot)
444 $dir = $dirroot.
"/core/modules/cheque/";
447 if (is_file($dir.$file) && is_readable($dir.$file)) {
448 $mybool |= include_once $dir.$file;
459 $obj =
new $classname();
461 $numref = $obj->getNextValue($mysoc, $this);
467 if ($mode !=
'last' && !$numref) {
474 $langs->load(
"errors");
475 print $langs->trans(
"Error").
" ".$langs->trans(
"ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv(
"Bank"));
491 global $conf, $langs;
493 if ($user->socid)
return -1;
495 $sql =
"SELECT b.rowid, b.datev as datefin";
496 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
497 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
498 $sql .=
" WHERE b.fk_account = ba.rowid";
499 $sql .=
" AND ba.entity IN (".getEntity(
'bank_account').
")";
500 $sql .=
" AND b.fk_type = 'CHQ'";
501 $sql .=
" AND b.fk_bordereau = 0";
502 $sql .=
" AND b.amount > 0";
507 $langs->load(
"banks");
511 $response->warning_delay = $conf->bank->cheque->warning_delay / 60 / 60 / 24;
512 $response->label = $langs->trans(
"BankChecksToReceipt");
513 $response->labelShort = $langs->trans(
"BankChecksToReceiptShort");
514 $response->url = DOL_URL_ROOT.
'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank';
517 while ($obj = $this->
db->fetch_object(
$resql))
521 if ($this->
db->jdate($obj->datefin) < ($now - $conf->bank->cheque->warning_delay)) {
522 $response->nbtodolate++;
529 $this->error = $this->
db->error();
546 if ($user->socid)
return -1;
548 $sql =
"SELECT count(b.rowid) as nb";
549 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
550 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
551 $sql .=
" WHERE b.fk_account = ba.rowid";
552 $sql .=
" AND ba.entity IN (".getEntity(
'bank_account').
")";
553 $sql .=
" AND b.fk_type = 'CHQ'";
554 $sql .=
" AND b.amount > 0";
559 while ($obj = $this->
db->fetch_object(
$resql))
561 $this->nb[
"cheques"] = $obj->nb;
567 $this->error = $this->
db->error();
582 global $langs, $conf;
584 if (empty($model)) $model =
'blochet';
586 dol_syslog(
"RemiseCheque::generatePdf model=".$model.
" id=".$this->id, LOG_DEBUG);
588 $dir = DOL_DOCUMENT_ROOT.
"/core/modules/cheque/doc/";
591 $file =
"pdf_".$model.
".class.php";
592 if (file_exists($dir.$file))
594 include_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
595 include_once $dir.$file;
597 $classname =
'BordereauCheque'.ucfirst($model);
598 $docmodel =
new $classname($this->
db);
600 $sql =
"SELECT b.banque, b.emetteur, b.amount, b.num_chq";
601 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
602 $sql .=
", ".MAIN_DB_PREFIX.
"bank_account as ba";
603 $sql .=
", ".MAIN_DB_PREFIX.
"bordereau_cheque as bc";
604 $sql .=
" WHERE b.fk_account = ba.rowid";
605 $sql .=
" AND b.fk_bordereau = bc.rowid";
606 $sql .=
" AND bc.rowid = ".$this->id;
607 $sql .=
" AND bc.entity = ".$conf->entity;
608 $sql .=
" ORDER BY b.dateo ASC, b.rowid ASC";
610 dol_syslog(
"RemiseCheque::generatePdf", LOG_DEBUG);
611 $result = $this->
db->query($sql);
615 while ($objp = $this->
db->fetch_object($result))
617 $docmodel->lines[$i] =
new stdClass();
618 $docmodel->lines[$i]->bank_chq = $objp->banque;
619 $docmodel->lines[$i]->emetteur_chq = $objp->emetteur;
620 $docmodel->lines[$i]->amount_chq = $objp->amount;
621 $docmodel->lines[$i]->num_chq = $objp->num_chq;
625 $docmodel->nbcheque = $this->nbcheque;
626 $docmodel->ref = $this->ref;
627 $docmodel->amount = $this->amount;
628 $docmodel->date = $this->date_bordereau;
631 $account->fetch($this->account_id);
633 $docmodel->account = &$account;
637 $sav_charseSupprimert_output = $outputlangs->charset_output;
638 $result = $docmodel->write_file($this, $conf->bank->dir_output.
'/checkdeposits', $this->ref, $outputlangs);
650 $this->error = $langs->trans(
"ErrorFileDoesNotExists", $dir.$file);
669 $sql =
"SELECT amount ";
670 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bank";
671 $sql .=
" WHERE fk_bordereau = ".$this->id;
676 while ($row = $this->
db->fetch_row(
$resql))
684 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
685 $sql .=
" SET amount = ".price2num($total);
686 $sql .=
", nbcheque = ".((int) $nb);
687 $sql .=
" WHERE rowid = ".$this->id;
688 $sql .=
" AND entity = ".$conf->entity;
693 $this->errno = -1030;
694 dol_syslog(
"RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)");
697 $this->errno = -1031;
698 dol_syslog(
"RemiseCheque::updateAmount ERREUR SELECT ($this->errno)");
701 if ($this->errno === 0)
705 $this->
db->rollback();
706 dol_syslog(
"RemiseCheque::updateAmount ROLLBACK ($this->errno)");
724 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
725 $sql .=
" SET fk_bordereau = 0";
726 $sql .=
" WHERE rowid = ".((int) $account_id);
727 $sql .=
" AND fk_bordereau = ".((int) $this->
id);
734 $this->errno = -1032;
735 dol_syslog(
"RemiseCheque::removeCheck ERREUR UPDATE ($this->errno)");
754 $payment->fetch(0, 0, $bank_id);
757 $bankline->fetch($bank_id);
771 $bankaccount = $payment->fk_account;
774 $sql =
'SELECT pf.fk_facture, pf.amount';
775 $sql .=
' FROM '.MAIN_DB_PREFIX.
'paiement_facture as pf';
776 $sql .=
' WHERE pf.fk_paiement = '.$payment->id;
782 $rejectedPayment->amounts = array();
783 $rejectedPayment->datepaye = $rejection_date;
784 $rejectedPayment->paiementid =
dol_getIdFromCode($this->
db,
'CHQ',
'c_paiement',
'code',
'id', 1);
785 $rejectedPayment->num_payment = $payment->num_payment;
787 while ($obj = $this->
db->fetch_object(
$resql))
790 $invoice->fetch($obj->fk_facture);
791 $invoice->set_unpaid($user);
793 $rejectedPayment->amounts[$obj->fk_facture] =
price2num($obj->amount) * -1;
796 $result = $rejectedPayment->create($user);
800 $result = $rejectedPayment->addPaymentToBank($user,
'payment',
'(CheckRejected)', $bankaccount,
'',
'');
803 $result = $payment->reject();
807 return $rejectedPayment->id;
809 $this->
db->rollback();
813 $this->error = $rejectedPayment->error;
814 $this->errors = $rejectedPayment->errors;
815 $this->
db->rollback();
819 $this->error = $rejectedPayment->error;
820 $this->errors = $rejectedPayment->errors;
821 $this->
db->rollback();
825 $this->error = $this->
db->lasterror();
826 $this->
db->rollback();
844 $sql =
"SELECT MAX(rowid)";
845 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bordereau_cheque";
846 $sql .=
" WHERE rowid < ".$this->id;
847 $sql .=
" AND entity = ".$conf->entity;
849 $result = $this->
db->query($sql);
852 $this->errno = -1035;
854 $row = $this->
db->fetch_row($result);
855 $this->previous_id = $row[0];
857 $sql =
"SELECT MIN(rowid)";
858 $sql .=
" FROM ".MAIN_DB_PREFIX.
"bordereau_cheque";
859 $sql .=
" WHERE rowid > ".$this->id;
860 $sql .=
" AND entity = ".$conf->entity;
862 $result = $this->
db->query($sql);
865 $this->errno = -1035;
867 $row = $this->
db->fetch_row($result);
868 $this->next_id = $row[0];
885 if ($user->rights->banque->cheque)
887 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
888 $sql .=
" SET date_bordereau = ".($date ?
"'".$this->db->idate($date).
"'" :
'null');
889 $sql .=
" WHERE rowid = ".$this->id;
891 dol_syslog(
"RemiseCheque::set_date", LOG_DEBUG);
895 $this->date_bordereau = $date;
898 $this->error = $this->
db->error();
917 if ($user->rights->banque->cheque)
919 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bordereau_cheque";
920 $sql .=
" SET ref = '".$ref.
"'";
921 $sql .=
" WHERE rowid = ".$this->id;
923 dol_syslog(
"RemiseCheque::set_number", LOG_DEBUG);
929 $this->error = $this->
db->error();
947 global $user, $langs, $conf;
951 $nownotime =
dol_mktime(0, 0, 0, $arraynow[
'mon'], $arraynow[
'mday'], $arraynow[
'year']);
955 $this->ref =
'SPECIMEN';
957 $this->date_bordereau = $nownotime;
970 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
972 global $conf, $langs;
976 $label =
'<u>'.$langs->trans(
"ShowCheckReceipt").
'</u>';
978 $label .=
'<b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
980 $url = DOL_URL_ROOT.
'/compta/paiement/cheque/card.php?id='.$this->id;
982 if ($option !=
'nolink')
985 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
986 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/',
$_SERVER[
"PHP_SELF"])) $add_save_lastsearch_values = 1;
987 if ($add_save_lastsearch_values) $url .=
'&save_lastsearch_values=1';
991 if (empty($notooltip))
993 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
995 $label = $langs->trans(
"ShowCheckReceipt");
996 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
998 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
999 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
1000 }
else $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
1002 $linkstart =
'<a href="'.$url.
'"';
1003 $linkstart .= $linkclose.
'>';
1006 $result .= $linkstart;
1007 if ($withpicto) $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);
1008 if ($withpicto != 2) $result .= $this->ref;
1009 $result .= $linkend;
1036 if (empty($this->labelStatus) || empty($this->labelStatusShort))
1039 $langs->load(
'compta');
1040 $this->labelStatus[self::STATUS_DRAFT] = $langs->trans(
'ToValidate');
1041 $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans(
'Validated');
1042 $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans(
'ToValidate');
1043 $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans(
'Validated');
1046 $statusType =
'status'.$status;
1047 if ($status == self::STATUS_VALIDATED) $statusType =
'status4';
1049 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
set_date($user, $date)
Set the creation date.
load_board($user)
Load indicators for dashboard (this->nbtodo and this->nbtodolate)
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...
LibStatut($status, $mode=0)
Return label of a status.
$errno
Numero d'erreur Plage 1024-1279.
if(!empty($arrayfields['u.datec']['checked'])) print_liste_field_titre("DateCreationShort"u if(!empty($arrayfields['u.tms']['checked'])) print_liste_field_titre("DateModificationShort"u if(!empty($arrayfields['u.statut']['checked'])) print_liste_field_titre("Status"u statut
dol_now($mode= 'auto')
Return date for now.
load_previous_next_id()
Charge les proprietes ref_previous et ref_next.
Class to manage bank transaction lines.
getNextNumRef($mode= 'next')
Return next reference of cheque receipts not already used (or last reference) according to numbering ...
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
$conf db
API class for accounts.
Class to manage bank accounts.
validate($user)
Validate a receipt.
getNomUrl($withpicto=0, $option= '', $notooltip=0, $morecss= '', $save_lastsearch_value=-1)
Return clicable name (with picto eventually)
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
removeCheck($account_id)
Insere la remise en base.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
Class to manage payments of customer invoices.
dol_getdate($timestamp, $fast=false, $forcetimezone= '')
Return an array with locale date info.
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
initAsSpecimen($option= '')
Initialise an instance with random values.
fetch($id, $ref= '')
Load record.
updateAmount()
Mets a jour le montant total.
print $_SERVER["PHP_SELF"]
Edit parameters.
dol_getIdFromCode($db, $key, $tablename, $fieldkey= 'code', $fieldid= 'id', $entityfilter=0)
Return an id or code from a code or id.
print
Draft customers invoices.
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...
getLibStatut($mode=0)
Retourne le libelle du statut d'une facture (brouillon, validee, abandonnee, payee) ...
set_number($user, $ref)
Set the ref of bordereau.
load_state_board()
Charge indicateurs this->nb de tableau de bord.
dolGetStatus($statusLabel= '', $statusLabelShort= '', $html= '', $statusType= 'status0', $displayMode=0, $url= '', $params=array())
Output the badge of a status.
Class to manage invoices.
Class to manage cheque delivery receipts.
rejectCheck($bank_id, $rejection_date)
Check return management Reopen linked invoices and create a new negative payment. ...
Parent class of all other business classes (invoices, contracts, proposals, orders, ...)
create($user, $account_id, $limit, $toRemise)
Create a receipt to send cheques.
generatePdf($model, $outputlangs)
Build document.
__construct($db)
Constructor.