29require_once DOL_DOCUMENT_ROOT.
'/core/class/commondocgenerator.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
62 $langs->load(
"bills");
63 return $langs->trans(
"NoDescription");
74 $langs->load(
"bills");
75 return $langs->trans(
"NoExample");
99 return $langs->trans(
"NotAvailable");
110 $langs->load(
"admin");
112 if ($this->version ==
'development') {
113 return $langs->trans(
"VersionDevelopment");
115 if ($this->version ==
'experimental') {
116 return $langs->trans(
"VersionExperimental");
118 if ($this->version ==
'dolibarr') {
121 if ($this->version) {
122 return $this->version;
124 return $langs->trans(
"NotAvailable");
149 $type =
'chequereceipt';
152 include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
155 $list = array(
'blochet'=>
'blochet');
175 global $conf, $langs;
176 $langs->load(
"bills");
178 $dir = DOL_DOCUMENT_ROOT.
"/core/modules/cheque/doc/";
182 if (!empty($conf->global->CHEQUERECEIPT_ADDON_PDF)) {
183 $modele = $conf->global->CHEQUERECEIPT_ADDON_PDF;
192 $file =
"pdf_".$modele.
".modules.php";
193 if (file_exists($dir.$file)) {
194 $classname =
"pdf_".$modele;
195 require_once $dir.$file;
197 $obj =
new $classname($db);
201 $sav_charset_output = $outputlangs->charset_output;
202 if ($obj->write_file($id, $outputlangs) > 0) {
203 $outputlangs->charset_output = $sav_charset_output;
206 $outputlangs->charset_output = $sav_charset_output;
211 dol_print_error(
'', $langs->trans(
"Error").
" ".$langs->trans(
"ErrorFileDoesNotExists", $dir.$file));
Parent class for documents generators.
Class parent for templates of document generation.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
Cheque Receipts numbering references mother class.
getExample()
Return numbering example.
canBeActivated()
Checks if the numbers already in the database do not cause conflicts that would prevent this numberin...
getNextValue($objsoc, $object)
Returns the next value.
isEnabled()
Return if a module can be used or not.
getVersion()
Returns the module numbering version.
info()
Return the default description of numbering module.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
Cree un bordereau remise de cheque.