Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0
This commit is contained in:
commit
7d27e011a5
@ -402,7 +402,7 @@ class AccountancyExport
|
|||||||
print length_accountg($line->numero_compte) . $this->separator;
|
print length_accountg($line->numero_compte) . $this->separator;
|
||||||
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
|
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
|
||||||
print '"'.dol_trunc($line->label_compte,40,'right','UTF-8',1).'"' . $this->separator;
|
print '"'.dol_trunc($line->label_compte,40,'right','UTF-8',1).'"' . $this->separator;
|
||||||
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1)."'".$this->separator;
|
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
|
||||||
print price2num($line->montant).$this->separator;
|
print price2num($line->montant).$this->separator;
|
||||||
print $line->sens.$this->separator;
|
print $line->sens.$this->separator;
|
||||||
print $date . $this->separator;
|
print $date . $this->separator;
|
||||||
|
|||||||
@ -2804,20 +2804,33 @@ class Propal extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='', $get_params='')
|
function getNomUrl($withpicto=0,$option='', $get_params='')
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
$label = '<u>' . $langs->trans("ShowPropal") . '</u>';
|
$label = '';
|
||||||
if (! empty($this->ref))
|
|
||||||
$label.= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
if ($user->rights->propal->lire) {
|
||||||
if (! empty($this->ref_client))
|
$label .= '<u>'.$langs->trans("ShowPropal").'</u>';
|
||||||
$label.= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
if (!empty($this->ref)) {
|
||||||
if (! empty($this->total_ht))
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
|
}
|
||||||
if (! empty($this->total_tva))
|
if (!empty($this->ref_client)) {
|
||||||
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
||||||
if (! empty($this->total_ttc))
|
}
|
||||||
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
if (!empty($this->total_ht)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_tva)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_ttc)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
if ($option == '') {
|
if ($option == '') {
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id. $get_params .$linkclose;
|
$link = '<a href="'.DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id. $get_params .$linkclose;
|
||||||
|
|||||||
@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
|
$langs->load('admin');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id=(GETPOST('facid','int')?GETPOST('facid','int'):GETPOST('id','int'));
|
$id=(GETPOST('facid','int')?GETPOST('facid','int'):GETPOST('id','int'));
|
||||||
@ -148,14 +149,14 @@ if ($action == 'add')
|
|||||||
$remin=GETPOST('remin');
|
$remin=GETPOST('remin');
|
||||||
$nb_gen_max=GETPOST('nb_gen_max', 'int');
|
$nb_gen_max=GETPOST('nb_gen_max', 'int');
|
||||||
//if (empty($nb_gen_max)) $nb_gen_max =0;
|
//if (empty($nb_gen_max)) $nb_gen_max =0;
|
||||||
|
|
||||||
if (GETPOST('frequency'))
|
if (GETPOST('frequency'))
|
||||||
{
|
{
|
||||||
if (empty($reyear) || empty($remonth) || empty($reday))
|
if (empty($reyear) || empty($remonth) || empty($reday))
|
||||||
{
|
{
|
||||||
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("Date")), null, 'errors');
|
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("Date")), null, 'errors');
|
||||||
$action = "create";
|
$action = "create";
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
if ($nb_gen_max === '')
|
if ($nb_gen_max === '')
|
||||||
{
|
{
|
||||||
@ -171,14 +172,14 @@ if ($action == 'add')
|
|||||||
$object->note_private = GETPOST('note_private');
|
$object->note_private = GETPOST('note_private');
|
||||||
$object->note_public = GETPOST('note_public');
|
$object->note_public = GETPOST('note_public');
|
||||||
$object->usenewprice = GETPOST('usenewprice');
|
$object->usenewprice = GETPOST('usenewprice');
|
||||||
|
|
||||||
$object->frequency = $frequency;
|
$object->frequency = $frequency;
|
||||||
$object->unit_frequency = GETPOST('unit_frequency', 'alpha');
|
$object->unit_frequency = GETPOST('unit_frequency', 'alpha');
|
||||||
$object->nb_gen_max = $nb_gen_max;
|
$object->nb_gen_max = $nb_gen_max;
|
||||||
$object->auto_validate = GETPOST('auto_validate', 'int');
|
$object->auto_validate = GETPOST('auto_validate', 'int');
|
||||||
|
|
||||||
$object->fk_project = $projectid;
|
$object->fk_project = $projectid;
|
||||||
|
|
||||||
$date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear);
|
$date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear);
|
||||||
$object->date_when = $date_next_execution;
|
$object->date_when = $date_next_execution;
|
||||||
|
|
||||||
@ -187,9 +188,9 @@ if ($action == 'add')
|
|||||||
{
|
{
|
||||||
$srcObject = new Facture($db);
|
$srcObject = new Facture($db);
|
||||||
$srcObject->fetch(GETPOST('facid','int'));
|
$srcObject->fetch(GETPOST('facid','int'));
|
||||||
|
|
||||||
$srcObject->fetchObjectLinked();
|
$srcObject->fetchObjectLinked();
|
||||||
|
|
||||||
if (! empty($srcObject->linkedObjectsIds['contrat']))
|
if (! empty($srcObject->linkedObjectsIds['contrat']))
|
||||||
{
|
{
|
||||||
$contractidid = reset($srcObject->linkedObjectsIds['contrat']);
|
$contractidid = reset($srcObject->linkedObjectsIds['contrat']);
|
||||||
@ -199,12 +200,12 @@ if ($action == 'add')
|
|||||||
$object->linked_objects[$object->origin] = $object->origin_id;
|
$object->linked_objects[$object->origin] = $object->origin_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$oldinvoice = new Facture($db);
|
$oldinvoice = new Facture($db);
|
||||||
$oldinvoice->fetch($id);
|
$oldinvoice->fetch($id);
|
||||||
|
|
||||||
$result = $object->create($user, $oldinvoice->id);
|
$result = $object->create($user, $oldinvoice->id);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -222,18 +223,18 @@ if ($action == 'add')
|
|||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action = "create";
|
$action = "create";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $object->id);
|
header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db->rollback();
|
$db->rollback();
|
||||||
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action = "create";
|
$action = "create";
|
||||||
@ -311,16 +312,16 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->factu
|
|||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$line=new FactureLigneRec($db);
|
$line=new FactureLigneRec($db);
|
||||||
|
|
||||||
// For triggers
|
// For triggers
|
||||||
$line->id = $lineid;
|
$line->id = $lineid;
|
||||||
|
|
||||||
if ($line->delete() > 0)
|
if ($line->delete() > 0)
|
||||||
{
|
{
|
||||||
$result=$object->update_price(1);
|
$result=$object->update_price(1);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -401,7 +402,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors');
|
setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors');
|
||||||
$error ++;
|
$error ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) {
|
if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) {
|
||||||
$ret = $object->fetch($id);
|
$ret = $object->fetch($id);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
@ -435,7 +436,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
|
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
|
||||||
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
|
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
|
||||||
if (empty($tva_tx)) $tva_npr=0;
|
if (empty($tva_tx)) $tva_npr=0;
|
||||||
|
|
||||||
$pu_ht = $prod->price;
|
$pu_ht = $prod->price;
|
||||||
$pu_ttc = $prod->price_ttc;
|
$pu_ttc = $prod->price_ttc;
|
||||||
$price_min = $prod->price_min;
|
$price_min = $prod->price_min;
|
||||||
@ -542,7 +543,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
$type = GETPOST('type');
|
$type = GETPOST('type');
|
||||||
$fk_unit= GETPOST('units', 'alpha');
|
$fk_unit= GETPOST('units', 'alpha');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Margin
|
// Margin
|
||||||
$fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : '');
|
$fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : '');
|
||||||
$buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value
|
$buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value
|
||||||
@ -550,7 +551,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
// Local Taxes
|
// Local Taxes
|
||||||
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $mysoc, $tva_npr);
|
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $mysoc, $tva_npr);
|
||||||
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr);
|
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr);
|
||||||
|
|
||||||
$info_bits = 0;
|
$info_bits = 0;
|
||||||
if ($tva_npr)
|
if ($tva_npr)
|
||||||
$info_bits |= 0x01;
|
$info_bits |= 0x01;
|
||||||
@ -582,7 +583,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}*/
|
}*/
|
||||||
$object->fetch($object->id); // Reload lines
|
$object->fetch($object->id); // Reload lines
|
||||||
|
|
||||||
unset($_POST['prod_entry_mode']);
|
unset($_POST['prod_entry_mode']);
|
||||||
|
|
||||||
unset($_POST['qty']);
|
unset($_POST['qty']);
|
||||||
@ -745,7 +746,7 @@ elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
$object->fetch($object->id); // Reload lines
|
$object->fetch($object->id); // Reload lines
|
||||||
|
|
||||||
unset($_POST['qty']);
|
unset($_POST['qty']);
|
||||||
unset($_POST['type']);
|
unset($_POST['type']);
|
||||||
unset($_POST['productid']);
|
unset($_POST['productid']);
|
||||||
@ -820,7 +821,7 @@ $companystatic = new Societe($db);
|
|||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
$tmparray=dol_getdate($now);
|
$tmparray=dol_getdate($now);
|
||||||
$today = dol_mktime(23,59,59,$tmparray['mon'],$tmparray['mday'],$tmparray['year']); // Today is last second of current day
|
$today = dol_mktime(23,59,59,$tmparray['mon'],$tmparray['mday'],$tmparray['year']); // Today is last second of current day
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create mode
|
* Create mode
|
||||||
@ -832,11 +833,11 @@ if ($action == 'create')
|
|||||||
$object = new Facture($db); // Source invoice
|
$object = new Facture($db); // Source invoice
|
||||||
$product_static = new Product($db);
|
$product_static = new Product($db);
|
||||||
$formproject = new FormProjets($db);
|
$formproject = new FormProjets($db);
|
||||||
|
|
||||||
if ($object->fetch($id, $ref) > 0)
|
if ($object->fetch($id, $ref) > 0)
|
||||||
{
|
{
|
||||||
$result = $object->getLinesArray();
|
$result = $object->getLinesArray();
|
||||||
|
|
||||||
print '<form action="fiche-rec.php" method="post">';
|
print '<form action="fiche-rec.php" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
@ -870,7 +871,7 @@ if ($action == 'create')
|
|||||||
print '<tr><td>'.$langs->trans("NotePrivate").'</td><td valign="top">';
|
print '<tr><td>'.$langs->trans("NotePrivate").'</td><td valign="top">';
|
||||||
print '<textarea class="flat centpercent" name="note_private" wrap="soft" rows="'.ROWS_4.'"></textarea>';
|
print '<textarea class="flat centpercent" name="note_private" wrap="soft" rows="'.ROWS_4.'"></textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Author
|
// Author
|
||||||
print "<tr><td>".$langs->trans("Author")."</td><td>".$user->getFullName($langs)."</td></tr>";
|
print "<tr><td>".$langs->trans("Author")."</td><td>".$user->getFullName($langs)."</td></tr>";
|
||||||
|
|
||||||
@ -894,7 +895,7 @@ if ($action == 'create')
|
|||||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . '</a>';
|
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . '</a>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bank account
|
// Bank account
|
||||||
if ($object->fk_account > 0)
|
if ($object->fk_account > 0)
|
||||||
{
|
{
|
||||||
@ -907,24 +908,24 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
|
||||||
// Autogeneration
|
// Autogeneration
|
||||||
$title = $langs->trans("Recurrence");
|
$title = $langs->trans("Recurrence");
|
||||||
print load_fiche_titre($title, '', 'calendar');
|
print load_fiche_titre($title, '', 'calendar');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Frequency
|
// Frequency
|
||||||
print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))."</td><td>";
|
print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))."</td><td>";
|
||||||
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='5' /> ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m'));
|
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='5' /> ".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m'));
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// First date of execution for cron
|
// First date of execution for cron
|
||||||
print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>";
|
print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>";
|
||||||
$date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1);
|
$date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1);
|
||||||
print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1);
|
print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Number max of generation
|
// Number max of generation
|
||||||
print "<tr><td>".$langs->trans("MaxPeriodNumber")."</td><td>";
|
print "<tr><td>".$langs->trans("MaxPeriodNumber")."</td><td>";
|
||||||
print '<input type="text" name="nb_gen_max" value="'.GETPOST('nb_gen_max').'" size="5" />';
|
print '<input type="text" name="nb_gen_max" value="'.GETPOST('nb_gen_max').'" size="5" />';
|
||||||
@ -960,9 +961,9 @@ if ($action == 'create')
|
|||||||
$disableremove=1;
|
$disableremove=1;
|
||||||
$ret = $object->printObjectLines('', $mysoc, $soc, $lineid, 0); // No date selector for template invoice
|
$ret = $object->printObjectLines('', $mysoc, $soc, $lineid, 0); // No date selector for template invoice
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if ($flag_price_may_change)
|
if ($flag_price_may_change)
|
||||||
@ -1004,10 +1005,10 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
|
|
||||||
$author = new User($db);
|
$author = new User($db);
|
||||||
$author->fetch($object->user_author);
|
$author->fetch($object->user_author);
|
||||||
|
|
||||||
$head=array();
|
$head=array();
|
||||||
$h=0;
|
$h=0;
|
||||||
$head[$h][0] = $_SERVER["PHP_SELF"].'?id='.$object->id;
|
$head[$h][0] = $_SERVER["PHP_SELF"].'?id='.$object->id;
|
||||||
@ -1029,8 +1030,8 @@ else
|
|||||||
$morehtmlref = $form->editfieldval($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer, 'string');
|
$morehtmlref = $form->editfieldval($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer, 'string');
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'none', $morehtmlref);
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'none', $morehtmlref);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Customer").'</td>';
|
print '<tr><td>'.$langs->trans("Customer").'</td>';
|
||||||
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'customer').'</td></tr>';
|
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'customer').'</td></tr>';
|
||||||
|
|
||||||
@ -1092,7 +1093,7 @@ else
|
|||||||
print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Note private
|
// Note private
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer);
|
print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer);
|
||||||
@ -1100,13 +1101,13 @@ else
|
|||||||
print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled)) {
|
if (! empty($conf->projet->enabled)) {
|
||||||
$langs->load('projects');
|
$langs->load('projects');
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('Project');
|
print $langs->trans('Project');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1116,7 +1117,7 @@ else
|
|||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
}
|
}
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
|
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
|
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
|
||||||
@ -1156,7 +1157,7 @@ else
|
|||||||
*/
|
*/
|
||||||
$title = $langs->trans("Recurrence");
|
$title = $langs->trans("Recurrence");
|
||||||
print load_fiche_titre($title, '', 'calendar');
|
print load_fiche_titre($title, '', 'calendar');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// if "frequency" is empty or = 0, the reccurence is disabled
|
// if "frequency" is empty or = 0, the reccurence is disabled
|
||||||
@ -1180,7 +1181,7 @@ else
|
|||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
print '</tr></table></form>';
|
print '</tr></table></form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($object->frequency > 0)
|
if ($object->frequency > 0)
|
||||||
{
|
{
|
||||||
@ -1192,7 +1193,7 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date when
|
// Date when
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
if ($action == 'date_when' || $object->frequency > 0)
|
if ($action == 'date_when' || $object->frequency > 0)
|
||||||
@ -1210,7 +1211,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Max period / Rest period
|
// Max period / Rest period
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
if ($action == 'nb_gen_max' || $object->frequency > 0)
|
if ($action == 'nb_gen_max' || $object->frequency > 0)
|
||||||
@ -1232,7 +1233,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status of generated invoices
|
// Status of generated invoices
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
if ($action == 'auto_validate' || $object->frequency > 0)
|
if ($action == 'auto_validate' || $object->frequency > 0)
|
||||||
@ -1247,28 +1248,28 @@ else
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Frequencry/Recurring section
|
// Frequencry/Recurring section
|
||||||
if ($object->frequency > 0)
|
if ($object->frequency > 0)
|
||||||
{
|
{
|
||||||
if (empty($conf->cron->enabled))
|
if (empty($conf->cron->enabled))
|
||||||
{
|
{
|
||||||
print info_admin($langs->trans("EnableAndSetupModuleCron", $langs->transnoentitiesnoconv("Module2300Name")));
|
print info_admin($langs->trans("EnableAndSetupModuleCron", $langs->transnoentitiesnoconv("Module2300Name")));
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Nb of generation already done
|
// Nb of generation already done
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfGenerationDone").'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("NbOfGenerationDone").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $object->nb_gen_done?$object->nb_gen_done:'0';
|
print $object->nb_gen_done?$object->nb_gen_done:'0';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date last
|
// Date last
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $langs->trans("DateLastGeneration");
|
print $langs->trans("DateLastGeneration");
|
||||||
@ -1276,12 +1277,12 @@ else
|
|||||||
print dol_print_date($object->date_last_gen, 'dayhour');
|
print dol_print_date($object->date_last_gen, 'dayhour');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lines
|
// Lines
|
||||||
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
|
||||||
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
|
||||||
@ -1289,11 +1290,11 @@ else
|
|||||||
<input type="hidden" name="mode" value="">
|
<input type="hidden" name="mode" value="">
|
||||||
<input type="hidden" name="id" value="' . $object->id . '">
|
<input type="hidden" name="id" value="' . $object->id . '">
|
||||||
';
|
';
|
||||||
|
|
||||||
if (! empty($conf->use_javascript_ajax) && $object->statut == 0) {
|
if (! empty($conf->use_javascript_ajax) && $object->statut == 0) {
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
print '<table id="tablelines" class="noborder noshadow" width="100%">';
|
||||||
// Show object lines
|
// Show object lines
|
||||||
if (! empty($object->lines))
|
if (! empty($object->lines))
|
||||||
@ -1302,28 +1303,28 @@ else
|
|||||||
//$disablemove=1;
|
//$disablemove=1;
|
||||||
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 0); // No date selector for template invoice
|
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 0); // No date selector for template invoice
|
||||||
}
|
}
|
||||||
|
|
||||||
// Form to add new line
|
// Form to add new line
|
||||||
if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline')
|
if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline')
|
||||||
{
|
{
|
||||||
if ($action != 'editline')
|
if ($action != 'editline')
|
||||||
{
|
{
|
||||||
$var = true;
|
$var = true;
|
||||||
|
|
||||||
// Add free products/services
|
// Add free products/services
|
||||||
$object->formAddObjectLine(0, $mysoc, $soc); // No date selector for template invoice
|
$object->formAddObjectLine(0, $mysoc, $soc); // No date selector for template invoice
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Barre d'actions
|
* Barre d'actions
|
||||||
@ -1363,15 +1364,15 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
print '<a name="builddoc"></a>'; // ancre
|
print '<a name="builddoc"></a>'; // ancre
|
||||||
|
|
||||||
// Linked object block
|
// Linked object block
|
||||||
$somethingshown = $form->showLinkedObjectBlock($object);
|
$somethingshown = $form->showLinkedObjectBlock($object);
|
||||||
|
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1416,7 +1417,7 @@ else
|
|||||||
else if ($year_date_when > 0)
|
else if ($year_date_when > 0)
|
||||||
{
|
{
|
||||||
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($year_date_when,1,false))."' AND '".$db->idate(dol_get_last_day($year_date_when,12,false))."'";
|
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($year_date_when,1,false))."' AND '".$db->idate(dol_get_last_day($year_date_when,12,false))."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
$nbtotalofrecords = 0;
|
$nbtotalofrecords = 0;
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
@ -1424,15 +1425,15 @@ else
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= $db->order($sortfield, $sortorder);
|
$sql.= $db->order($sortfield, $sortorder);
|
||||||
$sql.= $db->plimit($limit+1,$offset);
|
$sql.= $db->plimit($limit+1,$offset);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
$param='&socid='.$socid;
|
$param='&socid='.$socid;
|
||||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
@ -1457,9 +1458,9 @@ else
|
|||||||
$tmpkey=preg_replace('/search_options_/','',$key);
|
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||||
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
|
$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
|
||||||
|
|
||||||
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -1486,7 +1487,7 @@ else
|
|||||||
print_liste_field_titre(''); // Field may contains ling text
|
print_liste_field_titre(''); // Field may contains ling text
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
// Filters lines
|
// Filters lines
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
// Ref
|
// Ref
|
||||||
@ -1592,8 +1593,8 @@ else
|
|||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
if ($num > 0)
|
if ($num > 0)
|
||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -1617,7 +1618,7 @@ else
|
|||||||
print '<td align="center">'.yn($objp->frequency?1:0).'</td>';
|
print '<td align="center">'.yn($objp->frequency?1:0).'</td>';
|
||||||
print '<td align="center">'.($objp->frequency ? dol_print_date($objp->date_last_gen,'day') : '').'</td>';
|
print '<td align="center">'.($objp->frequency ? dol_print_date($objp->date_last_gen,'day') : '').'</td>';
|
||||||
print '<td align="center">'.($objp->frequency ? dol_print_date($objp->date_when,'day') : '').'</td>';
|
print '<td align="center">'.($objp->frequency ? dol_print_date($objp->date_when,'day') : '').'</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,7 +108,7 @@ class DolEditor
|
|||||||
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
// Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
|
||||||
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
// Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
|
||||||
$modulepart='fckeditor';
|
$modulepart='fckeditor';
|
||||||
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&file=';
|
$this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart='.$modulepart.'&entity='.$conf->entity.'&file=';
|
||||||
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
|
$this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/'.$modulepart.'/' ;
|
||||||
|
|
||||||
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
|
$this->editor->Config['LinkBrowser']=($uselocalbrowser?'true':'false');
|
||||||
|
|||||||
@ -45,10 +45,12 @@ $Config['Enabled'] = true ;
|
|||||||
|
|
||||||
|
|
||||||
// Path to user files relative to the document root.
|
// Path to user files relative to the document root.
|
||||||
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=medias'.(empty($website)?'':'_'.$website).'&file=' ;
|
$extEntity=(empty($entity) ? 1 : $entity); // For multicompany with external access
|
||||||
|
|
||||||
|
$Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=medias'.(empty($website)?'':'_'.$website).'&entity='.$extEntity.'&file=' ;
|
||||||
$Config['UserFilesAbsolutePathRelative'] = (empty($website) ? ((!empty($entity) ? '/' . $entity : '') . '/medias/') : ('/websites/'.$website));
|
$Config['UserFilesAbsolutePathRelative'] = (empty($website) ? ((!empty($entity) ? '/' . $entity : '') . '/medias/') : ('/websites/'.$website));
|
||||||
|
|
||||||
|
|
||||||
// Fill the following value it you prefer to specify the absolute path for the
|
// Fill the following value it you prefer to specify the absolute path for the
|
||||||
// user files directory. Useful if you are using a virtual directory, symbolic
|
// user files directory. Useful if you are using a virtual directory, symbolic
|
||||||
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
* @param string $urloption More parameters on URL request
|
* @param string $urloption More parameters on URL request
|
||||||
* @param int $minLength Minimum number of chars to trigger that Ajax search
|
* @param int $minLength Minimum number of chars to trigger that Ajax search
|
||||||
* @param int $autoselect Automatic selection if just one value
|
* @param int $autoselect Automatic selection if just one value
|
||||||
* @param array $ajaxoptions Multiple options array
|
* @param array $ajaxoptions Multiple options array
|
||||||
* Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
|
* Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
|
||||||
* Ex: array('disabled'=>
|
* Ex: array('disabled'=>
|
||||||
* Ex: array('show'=>
|
* Ex: array('show'=>
|
||||||
@ -61,8 +61,8 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
|||||||
$("input#search_'.$htmlname.'").keydown(function() {
|
$("input#search_'.$htmlname.'").keydown(function() {
|
||||||
$("#'.$htmlname.'").val("");
|
$("#'.$htmlname.'").val("");
|
||||||
});
|
});
|
||||||
|
|
||||||
/* I disable this. A call to trigger is already done later into the select action of the autocomplete code
|
/* I disable this. A call to trigger is already done later into the select action of the autocomplete code
|
||||||
$("input#search_'.$htmlname.'").change(function() {
|
$("input#search_'.$htmlname.'").change(function() {
|
||||||
console.log("Call the change trigger on input '.$htmlname.' because of a change on search_'.$htmlname.' was triggered");
|
console.log("Call the change trigger on input '.$htmlname.' because of a change on search_'.$htmlname.' was triggered");
|
||||||
$("#'.$htmlname.'").trigger("change");
|
$("#'.$htmlname.'").trigger("change");
|
||||||
@ -291,7 +291,7 @@ function ajax_multiautocompleter($htmlname, $fields, $url, $option='', $minLengt
|
|||||||
needtotrigger="#" + fields[i];
|
needtotrigger="#" + fields[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needtotrigger != "") // To force select2 to refresh visible content
|
if (needtotrigger != "") // To force select2 to refresh visible content
|
||||||
{
|
{
|
||||||
// We introduce a delay so hand is back to js and all other js change can be done before the trigger that may execute a submit is done
|
// We introduce a delay so hand is back to js and all other js change can be done before the trigger that may execute a submit is done
|
||||||
@ -356,9 +356,10 @@ function ajax_dialog($title,$message,$w=350,$h=150)
|
|||||||
* @param array $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
* @param array $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||||
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
|
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
|
||||||
* @param int $forcefocus Force focus on field
|
* @param int $forcefocus Force focus on field
|
||||||
|
* @param string $widthTypeOfAutocomplete 'resolve' or 'off'
|
||||||
* @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason.
|
* @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason.
|
||||||
*/
|
*/
|
||||||
function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0)
|
function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -375,7 +376,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$(\''.(preg_match('/^\./',$htmlname)?$htmlname:'#'.$htmlname).'\').'.$tmpplugin.'({
|
$(\''.(preg_match('/^\./',$htmlname)?$htmlname:'#'.$htmlname).'\').'.$tmpplugin.'({
|
||||||
dir: \'ltr\',
|
dir: \'ltr\',
|
||||||
width: \'resolve\', /* off or resolve */
|
width: \''.$widthTypeOfAutocomplete.'\', /* off or resolve */
|
||||||
minimumInputLength: '.$minLengthToAutocomplete.'
|
minimumInputLength: '.$minLengthToAutocomplete.'
|
||||||
})';
|
})';
|
||||||
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
if ($forcefocus) $msg.= '.select2(\'focus\')';
|
||||||
|
|||||||
@ -322,7 +322,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
|
|||||||
{
|
{
|
||||||
$result[1]=round($result[1]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
$result[1]=round($result[1]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
||||||
$result[2]=round($result[2]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
$result[2]=round($result[2]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
||||||
$result[0]=price2num($result[2]-$result[0], 'MT');
|
$result[0]=price2num($result[2]-$result[1], 'MT');
|
||||||
$result[9]=round($result[9]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
$result[9]=round($result[9]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
||||||
$result[10]=round($result[10]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
$result[10]=round($result[10]/$conf->global->MAIN_ROUNDING_RULE_TOT, 0)*$conf->global->MAIN_ROUNDING_RULE_TOT;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -505,7 +505,7 @@ class CommentParser
|
|||||||
$data = explode('|', $data);
|
$data = explode('|', $data);
|
||||||
$r['type'] = count($data) == 1 ? $data[0] : $data;
|
$r['type'] = count($data) == 1 ? $data[0] : $data;
|
||||||
}
|
}
|
||||||
if (isset($r['type']) && Text::endsWith($r['type'], '[]')) {
|
if (isset($r['type']) && is_string($r['type']) && Text::endsWith($r['type'], '[]')) {
|
||||||
$r[static::$embeddedDataName]['type'] = substr($r['type'], 0, -2);
|
$r[static::$embeddedDataName]['type'] = substr($r['type'], 0, -2);
|
||||||
$r['type'] = 'array';
|
$r['type'] = 'array';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -170,6 +170,12 @@ ProfId3FR=Id. prof. 3 (NAF-APE)
|
|||||||
ProfId4FR=Id. prof. 4 (RCS/RM)
|
ProfId4FR=Id. prof. 4 (RCS/RM)
|
||||||
ProfId5FR=-
|
ProfId5FR=-
|
||||||
ProfId6FR=-
|
ProfId6FR=-
|
||||||
|
ProfId1GA=Id. prof. 1 (NIF)
|
||||||
|
ProfId2GA=Id. prof. 2 (RCCM)
|
||||||
|
ProfId3GA=Id. prof. 3 (CAE)
|
||||||
|
ProfId4GA=Id. prof. 4
|
||||||
|
ProfId5GA=-
|
||||||
|
ProfId6GA=-
|
||||||
ProfId1GB=Numéro d'enregistrement
|
ProfId1GB=Numéro d'enregistrement
|
||||||
ProfId2GB=-
|
ProfId2GB=-
|
||||||
ProfId3GB=SIC
|
ProfId3GB=SIC
|
||||||
|
|||||||
@ -36,7 +36,13 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
|||||||
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
if (! defined('NOREQUIREHOOK')) define('NOREQUIREHOOK','1'); // Disable "main.inc.php" hooks
|
||||||
// Some value of modulepart can be used to get resources that are public so no login are required.
|
// Some value of modulepart can be used to get resources that are public so no login are required.
|
||||||
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'companylogo') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
||||||
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') && ! defined("NOLOGIN")) define("NOLOGIN",'1');
|
if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') && ! defined("NOLOGIN"))
|
||||||
|
{
|
||||||
|
define("NOLOGIN",'1');
|
||||||
|
// For multicompany
|
||||||
|
$entity=(! empty($_GET['entity']) ? (int) $_GET['entity'] : (! empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
|
||||||
|
if (is_numeric($entity)) define("DOLENTITY", $entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Header empty
|
* Header empty
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user