63 public function selectProposalStatus($selected =
'', $short = 0, $excludedraft = 0, $showempty = 1, $mode =
'customer', $htmlname =
'propal_statut')
68 $listofstatus = array();
69 if ($mode ==
'supplier') {
70 $prefix =
'SupplierProposalStatus';
72 $langs->load(
"supplier_proposal");
73 $listofstatus = array(
74 0=>array(
'id'=>0,
'code'=>
'PR_DRAFT'),
75 1=>array(
'id'=>1,
'code'=>
'PR_OPEN'),
76 2=>array(
'id'=>2,
'code'=>
'PR_SIGNED'),
77 3=>array(
'id'=>3,
'code'=>
'PR_NOTSIGNED'),
78 4=>array(
'id'=>4,
'code'=>
'PR_CLOSED')
81 $prefix =
"PropalStatus";
83 $sql =
"SELECT id, code, label, active FROM ".MAIN_DB_PREFIX.
"c_propalst";
84 $sql .=
" WHERE active = 1";
85 dol_syslog(get_class($this).
"::selectProposalStatus", LOG_DEBUG);
95 $obj = $this->
db->fetch_object(
$resql);
96 $listofstatus[$obj->id] = array(
'id'=>$obj->id,
'code'=>$obj->code,
'label'=>$obj->label);
105 print '<select class="flat" id="'.$htmlname.
'" name="'.$htmlname.
'">';
106 if ($showempty)
print '<option value="-1"> </option>';
108 foreach ($listofstatus as $key => $obj)
112 if ($obj[
'code'] ==
'Draft' || $obj[
'code'] ==
'PR_DRAFT')
118 if ($selected !=
'' && $selected == $obj[
'id'])
120 print '<option value="'.$obj[
'id'].
'" selected>';
122 print '<option value="'.$obj[
'id'].
'">';
125 if ($langs->trans($prefix.$key.($short ?
'Short' :
'')) != $prefix.$key.($short ?
'Short' :
''))
127 print $langs->trans($prefix.$key.($short ?
'Short' :
''));
129 $conv_to_new_code = array(
'PR_DRAFT'=>
'Draft',
'PR_OPEN'=>
'Validated',
'PR_CLOSED'=>
'Closed',
'PR_SIGNED'=>
'Signed',
'PR_NOTSIGNED'=>
'NotSigned',
'PR_FAC'=>
'Billed');
130 if (!empty($conv_to_new_code[$obj[
'code']])) $key = $conv_to_new_code[$obj[
'code']];
132 print ($langs->trans($prefix.$key.($short ?
'Short' :
'')) != $prefix.$key.($short ?
'Short' :
'')) ? $langs->trans($prefix.$key.($short ?
'Short' :
'')) : ($obj[
'label'] ? $obj[
'label'] : $obj[
'code']);
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete= 'resolve')
Convert a html select field into an ajax combobox.
$conf db
API class for accounts.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
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...