34require
'../../main.inc.php';
35require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
42$langs->loadLangs(array(
'banks',
'categories',
'compta',
'bills',
'other'));
43if (isModEnabled(
'adherent')) {
44 $langs->load(
"members");
46if (isModEnabled(
'don')) {
47 $langs->load(
"donations");
49if (isModEnabled(
'loan')) {
52if (isModEnabled(
'salaries')) {
53 $langs->load(
"salaries");
58$rowid =
GETPOST(
"rowid",
'int');
59$accountoldid =
GETPOST(
'account',
'int');
60$accountid =
GETPOST(
'accountid',
'int');
62$action =
GETPOST(
'action',
'aZ09');
63$confirm =
GETPOST(
'confirm',
'alpha');
64$orig_account =
GETPOST(
"orig_account");
65$backtopage =
GETPOST(
'backtopage',
'alpha');
66$cancel =
GETPOST(
'cancel',
'alpha');
69$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref :
''));
70$fieldtype = (!empty($ref) ?
'ref' :
'rowid');
73 $socid = $user->socid;
76$result =
restrictedArea($user,
'banque', $accountoldid,
'bank_account');
77if (!$user->hasRight(
'banque',
'lire') && !$user->hasRight(
'banque',
'consolidate')) {
81$hookmanager->initHooks(array(
'bankline'));
84$extrafields->fetch_name_optionals_label($object->element);
90$parameters = array(
'socid' => $socid);
91$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
97 header(
"Location: ".$backtopage);
103if ($user->hasRight(
'banque',
'consolidate') && $action ==
'donext') {
105 $al->dateo_next(
GETPOST(
"rowid",
'int'));
106} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'doprev') {
108 $al->dateo_previous(
GETPOST(
"rowid",
'int'));
109} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvnext') {
111 $al->datev_next(
GETPOST(
"rowid",
'int'));
112} elseif ($user->hasRight(
'banque',
'consolidate') && $action ==
'dvprev') {
114 $al->datev_previous(
GETPOST(
"rowid",
'int'));
117if ($action ==
'confirm_delete_categ' && $confirm ==
"yes" && $user->hasRight(
'banque',
'modifier')) {
118 $cat1 =
GETPOST(
"cat1",
'int');
119 if (!empty($rowid) && !empty($cat1)) {
120 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"bank_class WHERE lineid = ".((int) $rowid).
" AND fk_categ = ".((int) $cat1);
121 if (!$db->query($sql)) {
129if ($user->hasRight(
'banque',
'modifier') && $action ==
"update") {
132 $result = $object->fetch($rowid);
134 dol_syslog(
'Failed to read bank line with id '.$rowid, LOG_WARNING);
135 $object->id = $rowid;
139 $acsource->fetch($accountoldid);
142 if (
GETPOST(
'accountid',
'int') > 0 && !$object->rappro && !$object->getVentilExportCompta()) {
143 $actarget->fetch(
GETPOST(
'accountid',
'int'));
145 $actarget->fetch($accountoldid);
148 if (!($actarget->id > 0)) {
149 setEventMessages($langs->trans(
"ErrorFailedToLoadBankAccount"),
null,
'errors');
153 setEventMessages($langs->trans(
"ErrorCashAccountAcceptsOnlyCashMoney"),
null,
'errors');
163 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
166 if (GETPOSTISSET(
'value')) {
167 $sql .=
" fk_type='".$db->escape(
GETPOST(
'value')).
"',";
169 if (GETPOSTISSET(
'num_chq')) {
170 $sql .=
" num_chq='".$db->escape(
GETPOST(
"num_chq")).
"',";
172 if (GETPOSTISSET(
'banque')) {
173 $sql .=
" banque='".$db->escape(
GETPOST(
"banque")).
"',";
175 if (GETPOSTISSET(
'emetteur')) {
176 $sql .=
" emetteur='".$db->escape(
GETPOST(
"emetteur")).
"',";
179 if (!$object->rappro) {
180 if (GETPOSTISSET(
'label')) {
181 $sql .=
" label = '".$db->escape(
GETPOST(
"label")).
"',";
183 if (GETPOSTISSET(
'amount')) {
184 $sql .=
" amount= '".$db->escape($amount).
"',";
186 if (GETPOSTISSET(
'dateomonth')) {
187 $sql .=
" dateo = '".$db->idate($dateop).
"',";
189 if (GETPOSTISSET(
'datevmonth')) {
190 $sql .=
" datev = '".$db->idate($dateval).
"',";
193 $sql .=
" fk_account = ".((int) $actarget->id);
194 $sql .=
" WHERE rowid = ".((int) $object->id);
196 $result = $db->query($sql);
202 $arrayofcategs =
GETPOST(
'custcats',
'array');
203 $sql =
"DELETE FROM ".MAIN_DB_PREFIX.
"bank_class WHERE lineid = ".((int) $rowid);
204 if (!$db->query($sql)) {
208 if (count($arrayofcategs)) {
209 foreach ($arrayofcategs as $val) {
210 $sql =
"INSERT INTO ".MAIN_DB_PREFIX.
"bank_class (lineid, fk_categ) VALUES (".((int) $rowid).
", ".((int) $val).
")";
211 if (!$db->query($sql)) {
221 $extrafields->setOptionalsFromPost(
null, $object,
'@GETPOSTISSET');
222 $object->insertExtraFields();
236if ($user->hasRight(
'banque',
'consolidate') && ($action ==
'num_releve' || $action ==
'setreconcile')) {
237 $num_rel = trim(
GETPOST(
"num_rel"));
238 $rappro =
GETPOST(
'reconciled') ? 1 : 0;
241 if ($rappro && empty($num_rel)) {
242 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"AccountStatement")),
null,
'errors');
248 $object->fetch($rowid);
249 $oldNum_rel = $object->num_releve;
250 $id = $object->fk_account;
252 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"bank";
253 $sql .=
" SET num_releve = ".($num_rel ?
"'".$db->escape($num_rel).
"'" :
"null");
254 if (empty($num_rel)) {
255 $sql .=
", rappro = 0";
257 $sql .=
", rappro = ".((int) $rappro);
259 $sql .=
" WHERE rowid = ".((int) $rowid);
261 $updatePathFile =
true;
264 dol_syslog(
"line.php update bank line to set the new bank receipt nuber", LOG_DEBUG);
266 $result = $db->query($sql);
293 if ($result && $updatePathFile && $update_dir) {
297 $langs->load(
"errors");
298 setEventMessages($langs->trans(
"ErrorFailToRenameDir", $oldfilepath, $filepath),
null,
'mesgs');
310$form =
new Form($db);
312llxHeader(
'', $langs->trans(
"BankTransaction"));
314$arrayselected = array();
317$cats = $c->containing($rowid, Categorie::TYPE_BANK_LINE);
318if (is_array($cats)) {
319 foreach ($cats as $cat) {
320 $arrayselected[] = $cat->id;
324$head = bankline_prepare_head($rowid);
327$sql =
"SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro,";
328$sql .=
" b.num_releve, b.fk_user_author, b.num_chq, b.fk_type, b.fk_account, b.fk_bordereau as receiptid,";
329$sql .=
" b.emetteur,b.banque";
330$sql .=
" FROM ".MAIN_DB_PREFIX.
"bank as b";
331$sql .=
" WHERE rowid=".((int) $rowid);
332$sql .=
" ORDER BY dateo ASC";
333$result = $db->query($sql);
337 if ($db->num_rows($result)) {
338 $objp = $db->fetch_object($result);
340 $total = $total + $objp->amount;
343 $acct->fetch($objp->fk_account);
344 $account = $acct->id;
347 $bankline->fetch($rowid, $ref);
349 $links = $acct->get_url($rowid);
350 $bankline->load_previous_next_ref(
'',
'rowid');
353 if ($action ==
'delete_categ') {
354 print $form->formconfirm($_SERVER[
'PHP_SELF'].
"?rowid=".urlencode($rowid).
"&cat1=".urlencode(
GETPOST(
"fk_categ",
'int')).
"&orig_account=".urlencode($orig_account), $langs->trans(
"RemoveFromRubrique"), $langs->trans(
"RemoveFromRubriqueConfirm"),
"confirm_delete_categ",
'',
'yes', 1);
357 print
'<form name="update" method="POST" action="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$rowid.
'">';
358 print
'<input type="hidden" name="token" value="'.newToken().
'">';
359 print
'<input type="hidden" name="action" value="update">';
360 print
'<input type="hidden" name="orig_account" value="'.$orig_account.
'">';
361 print
'<input type="hidden" name="account" value="'.$acct->id.
'">';
363 print
dol_get_fiche_head($head,
'bankline', $langs->trans(
'LineRecord'), 0,
'accountline', 0);
365 $linkback =
'<a href="'.DOL_URL_ROOT.
'/compta/bank/bankentries_list.php?restore_lastsearch_values=1'.(
GETPOST(
'account',
'int', 1) ?
'&id='.GETPOST(
'account',
'int', 1) :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
370 print
'<div class="fichecenter2">';
372 print
'<div class="underbanner clearboth"></div>';
373 print
'<table class="border centpercent tableforfield">';
378 print
'<tr><td class="titlefieldcreate">'.$langs->trans(
"Account").
'</td>';
381 if (($objp->rappro || $bankline->getVentilExportCompta()) && $objp->fk_account > 0) {
382 print $acct->getNomUrl(1,
'transactions',
'reflabel');
384 print
img_picto(
'',
'bank_account',
'class="paddingright"');
385 print $form->select_comptes($acct->id,
'accountid', 0,
'', ($acct->id > 0 ? $acct->id : 1),
'', 0,
'', 1);
392 print
'<tr><td class="tdtop">'.$langs->trans(
"Links").
'</td>';
394 foreach ($links as $key => $val) {
398 if ($links[$key][
'type'] ==
'payment') {
399 require_once DOL_DOCUMENT_ROOT.
'/compta/paiement/class/paiement.class.php';
401 $paymenttmp->fetch($links[$key][
'url_id']);
402 $paymenttmp->ref = $langs->trans(
"Payment").
' '.$paymenttmp->ref;
407 print $paymenttmp->getNomUrl(1);
408 } elseif ($links[$key][
'type'] ==
'payment_supplier') {
409 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/paiementfourn.class.php';
411 $paymenttmp->fetch($links[$key][
'url_id']);
412 $paymenttmp->ref = $langs->trans(
"Payment").
' '.$paymenttmp->ref;
417 print $paymenttmp->getNomUrl(1);
418 } elseif ($links[$key][
'type'] ==
'company') {
420 $societe->fetch($links[$key][
'url_id']);
421 print $societe->getNomUrl(1);
422 } elseif ($links[$key][
'type'] ==
'sc') {
423 print
'<a href="'.DOL_URL_ROOT.
'/compta/sociales/card.php?id='.$links[$key][
'url_id'].
'">';
424 print
img_object($langs->trans(
'SocialContribution'),
'bill').
' ';
425 print $langs->trans(
"SocialContribution").($links[$key][
'label'] ?
' - '.$links[$key][
'label'] :
'');
427 } elseif ($links[$key][
'type'] ==
'vat') {
428 print
'<a href="'.DOL_URL_ROOT.
'/compta/tva/card.php?id='.$links[$key][
'url_id'].
'">';
429 print
img_object($langs->trans(
'VATDeclaration'),
'bill').
' ';
430 print $langs->trans(
"VATDeclaration").($links[$key][
'label'] ?
' '.$links[$key][
'label'] :
'');
432 } elseif ($links[$key][
'type'] ==
'salary') {
433 print
'<a href="'.DOL_URL_ROOT.
'/salaries/card.php?id='.$links[$key][
'url_id'].
'">';
434 print
img_object($langs->trans(
'Salary'),
'bill').
' ';
435 print $langs->trans(
"Salary").($links[$key][
'label'] ?
' - '.$links[$key][
'label'] :
'');
437 } elseif ($links[$key][
'type'] ==
'payment_sc') {
438 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_sc/card.php?id='.$links[$key][
'url_id'].
'">';
439 print
img_object($langs->trans(
'Payment'),
'payment').
' ';
440 print $langs->trans(
"SocialContributionPayment");
442 } elseif ($links[$key][
'type'] ==
'payment_vat') {
443 print
'<a href="'.DOL_URL_ROOT.
'/compta/payment_vat/card.php?id='.$links[$key][
'url_id'].
'">';
444 print
img_object($langs->trans(
'VATPayment'),
'payment').
' ';
445 print $langs->trans(
"VATPayment");
447 } elseif ($links[$key][
'type'] ==
'payment_salary') {
448 print
'<a href="'.DOL_URL_ROOT.
'/salaries/payment_salary/card.php?id='.$links[$key][
'url_id'].
'">';
449 print
img_object($langs->trans(
'PaymentSalary'),
'payment').
' ';
450 print $langs->trans(
"SalaryPayment");
452 } elseif ($links[$key][
'type'] ==
'payment_loan') {
453 print
'<a href="'.DOL_URL_ROOT.
'/loan/payment/card.php?id='.$links[$key][
'url_id'].
'">';
454 print
img_object($langs->trans(
'LoanPayment'),
'payment').
' ';
455 print $langs->trans(
"PaymentLoan");
457 } elseif ($links[$key][
'type'] ==
'loan') {
458 print
'<a href="'.DOL_URL_ROOT.
'/loan/card.php?id='.$links[$key][
'url_id'].
'">';
459 print
img_object($langs->trans(
'Loan'),
'bill').
' ';
460 print $langs->trans(
"Loan");
462 } elseif ($links[$key][
'type'] ==
'member') {
463 print
'<a href="'.DOL_URL_ROOT.
'/adherents/card.php?rowid='.$links[$key][
'url_id'].
'">';
464 print
img_object($langs->trans(
'Member'),
'user').
' ';
465 print $links[$key][
'label'];
467 } elseif ($links[$key][
'type'] ==
'payment_donation') {
468 print
'<a href="'.DOL_URL_ROOT.
'/don/payment/card.php?id='.$links[$key][
'url_id'].
'">';
469 print
img_object($langs->trans(
'Donation'),
'payment').
' ';
470 print $langs->trans(
"DonationPayment");
472 } elseif ($links[$key][
'type'] ==
'banktransfert') {
473 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/line.php?rowid='.$links[$key][
'url_id'].
'">';
474 print
img_object($langs->trans(
'Transaction'),
'payment').
' ';
475 print $langs->trans(
"TransactionOnTheOtherAccount");
477 } elseif ($links[$key][
'type'] ==
'user') {
478 print
'<a href="'.DOL_URL_ROOT.
'/user/card.php?id='.$links[$key][
'url_id'].
'">';
479 print
img_object($langs->trans(
'User'),
'user').
' ';
480 print $langs->trans(
"User");
482 } elseif ($links[$key][
'type'] ==
'payment_various') {
483 print
'<a href="'.DOL_URL_ROOT.
'/compta/bank/various_payment/card.php?id='.$links[$key][
'url_id'].
'">';
484 print
img_object($langs->trans(
'VariousPayment'),
'payment').
' ';
485 print $langs->trans(
"VariousPayment");
489 print
'<a href="'.$links[$key][
'url'].$links[$key][
'url_id'].
'">';
491 print $links[$key][
'label'];
502 print
"<tr><td>".$langs->trans(
"Type").
" / ".$langs->trans(
"Numero");
503 print
' <em>('.$langs->trans(
"ChequeOrTransferNumber").
')</em>';
505 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
507 $form->select_types_paiements($objp->fk_type,
"value",
'', 2);
508 print
'<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ?
'' : $objp->num_chq).
'">';
509 if ($objp->receiptid) {
510 include_once DOL_DOCUMENT_ROOT.
'/compta/paiement/cheque/class/remisecheque.class.php';
512 $receipt->fetch($objp->receiptid);
513 print
' '.$langs->trans(
"CheckReceipt").
': '.$receipt->getNomUrl(2);
522 print
"<tr><td>".$langs->trans(
"CheckTransmitter");
523 print
' <em>('.$langs->trans(
"ChequeMaker").
')</em>';
525 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
527 print
'<input type="text" class="flat minwidth200" name="emetteur" value="'.(empty($objp->emetteur) ?
'' :
dol_escape_htmltag($objp->emetteur)).
'">';
530 print
'<td>'.$objp->emetteur.
'</td>';
535 print
"<tr><td>".$langs->trans(
"Bank");
536 print
' <em>('.$langs->trans(
"ChequeBank").
')</em>';
538 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
540 print
'<input type="text" class="flat minwidth200" name="banque" value="'.(empty($objp->banque) ?
'' :
dol_escape_htmltag($objp->banque)).
'">';
543 print
'<td>'.dol_escape_htmltag($objp->banque).
'</td>';
548 print
'<tr><td>'.$langs->trans(
"DateOperation").
'</td>';
549 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
551 print $form->selectDate($db->jdate($objp->do),
'dateo',
'',
'',
'',
'update', 1, 0, $objp->rappro);
552 if (!$objp->rappro) {
554 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=doprev&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.newToken().
'">';
556 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=donext&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.newToken().
'">';
568 print
"<tr><td>".$langs->trans(
"DateValue").
"</td>";
569 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
571 print $form->selectDate($db->jdate($objp->dv),
'datev',
'',
'',
'',
'update', 1, 0, $objp->rappro);
572 if (!$objp->rappro) {
574 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvprev&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.newToken().
'">';
576 print
'<a class="ajaxforbankoperationchange" href="'.$_SERVER[
'PHP_SELF'].
'?action=dvnext&id='.$objp->fk_account.
'&rowid='.$objp->rowid.
'&token='.newToken().
'">';
589 print
"<tr><td>".$langs->trans(
"Label").
"</td>";
590 if ($user->hasRight(
'banque',
'modifier') || $user->hasRight(
'banque',
'consolidate')) {
592 print
'<input name="label" class="flat minwidth300" '.($objp->rappro ?
' disabled' :
'').
' value="';
593 if (preg_match(
'/^\((.*)\)$/i', $objp->label, $reg)) {
595 print $langs->trans($reg[1]);
603 if (preg_match(
'/^\((.*)\)$/i', $objp->label, $reg)) {
605 print $langs->trans($reg[1]);
614 print
"<tr><td>".$langs->trans(
"Amount").
"</td>";
615 if ($user->hasRight(
'banque',
'modifier')) {
617 print
'<input name="amount" class="flat maxwidth100" '.($objp->rappro ?
' disabled' :
'').
' value="'.
price($objp->amount).
'"> '.$langs->trans(
"Currency".$acct->currency_code);
621 print
price($objp->amount);
627 if (isModEnabled(
'categorie') && $user->hasRight(
'categorie',
'lire')) {
628 $langs->load(
'categories');
631 print
'<tr><td class="toptd">'.$form->editfieldkey(
'RubriquesTransactions',
'custcats',
'', $object, 0).
'</td><td>';
632 $cate_arbo = $form->select_all_categories(Categorie::TYPE_BANK_LINE,
null,
'parent',
null,
null, 1);
634 $arrayselected = array();
637 $cats = $c->containing($bankline->id, Categorie::TYPE_BANK_LINE);
638 if (is_array($cats)) {
639 foreach ($cats as $cat) {
640 $arrayselected[] = $cat->id;
643 print
img_picto(
'',
'category',
'class="paddingright"').$form->multiselectarray(
'custcats', $cate_arbo, $arrayselected,
null,
null,
null,
null,
"90%");
648 $parameters = array();
649 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $bankline, $action);
650 print $hookmanager->resPrint;
651 if (empty($reshook)) {
652 print $bankline->showOptionals($extrafields, ($objp->rappro ?
'view' :
'create'), $parameters);
685 print
'<div class="center"><input type="submit" class="button" value="'.$langs->trans(
"Update").
'"></div><br>';
692 if ($acct->canBeConciliated() > 0) {
693 print
load_fiche_titre($langs->trans(
"Reconciliation"),
'',
'bank_account');
696 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'?rowid='.$objp->rowid.
'">';
697 print
'<input type="hidden" name="token" value="'.newToken().
'">';
698 print
'<input type="hidden" name="action" value="setreconcile">';
699 print
'<input type="hidden" name="orig_account" value="'.$orig_account.
'">';
700 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
702 print
'<div class="fichecenter">';
704 print
'<table class="border centpercent">';
706 print
'<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans(
"AccountStatement"), $langs->trans(
"InputReceiptNumber")).
"</td>";
707 if ($user->hasRight(
'banque',
'consolidate')) {
710 print
'<input name="num_rel_bis" id="num_rel_bis" class="flat" type="text" value="'.$objp->num_releve.
'"'.($objp->rappro ?
' disabled' :
'').
'>';
711 print
'<input name="num_rel" id="num_rel" class="flat" type="hidden" value="'.$objp->num_releve.
'">';
713 print
'<input name="num_rel" id="num_rel" class="flat" value="'.$objp->num_releve.
'"'.($objp->rappro ?
' disabled' :
'').
'>';
715 if ($objp->num_releve) {
716 print
' <a href="'.DOL_URL_ROOT.
'/compta/bank/releve.php?num='.$objp->num_releve.
'&account='.$acct->id.
'">('.$langs->trans(
"AccountStatement").
' '.$objp->num_releve.
')</a>';
720 print
'<td>'.$objp->num_releve.
'</td>';
724 print
'<tr><td><label for="reconciled">'.$langs->trans(
"BankLineConciliated").
'</label></td>';
725 if ($user->hasRight(
'banque',
'consolidate')) {
727 print
'<input type="checkbox" id="reconciled" name="reconciled" class="flat" '.(GETPOSTISSET(
"reconciled") ? (
GETPOST(
"reconciled") ?
' checked="checked"' :
'') : ($objp->rappro ?
' checked="checked"' :
'')).
'">';
730 <script type="text/javascript">
731 jQuery(document).ready(function() {
732 $("#reconciled").click(function(){
733 console.log("We click on checkbox reconciled "+$("#reconciled").prop("checked"));
734 if ($("#reconciled").prop("checked") == false) {
735 console.log("we remove disabled");
736 jQuery("#num_rel_bis").removeAttr("disabled");
737 jQuery("#num_rel").removeAttr("disabled");
738 jQuery("#num_rel_bis").attr("type", "hidden");
739 jQuery("#num_rel").attr("type", "text");
740 jQuery("#num_rel_bis").hide();
741 jQuery("#num_rel").show();
752 print
'<td>'.yn($objp->rappro).
'</td>';
759 print
'<div class="center">';
761 print
'<input type="submit" class="button" value="'.$langs->trans(
"Update").
'">';
764 print
'<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans(
"Cancel").
'">';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage bank accounts.
const TYPE_CASH
Cash account.
Class to manage bank transaction lines.
Class to manage categories.
Class to manage payments for supplier invoices.
Class to manage payments of customer invoices.
Class to manage cheque delivery receipts.
Class to manage third parties objects (customers, suppliers, prospects...)
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
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...
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
img_edit_add($titlealt='default', $other='')
Show logo +.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
img_edit_remove($titlealt='default', $other='')
Show logo -.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.