Merge remote-tracking branch 'Dolibarr/11.0' into 11
This commit is contained in:
commit
a44ffbf40c
@ -104,6 +104,27 @@ with
|
||||
//return false;
|
||||
}
|
||||
|
||||
* Replace in tcpdf.php
|
||||
|
||||
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
with
|
||||
|
||||
// @CHANGE LDR Add support for src="file://..." links
|
||||
if (strpos($imgsrc, 'file://') === 0) {
|
||||
$imgsrc = str_replace('file://', '/', $imgsrc);
|
||||
$imgsrc = urldecode($imgsrc);
|
||||
$testscrtype = @parse_url($imgsrc);
|
||||
if (empty($testscrtype['query'])) {
|
||||
// convert URL to server path
|
||||
$imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
|
||||
} elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
|
||||
// convert URL to server path
|
||||
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
|
||||
}
|
||||
}
|
||||
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
|
||||
|
||||
|
||||
* In tecnickcom/tcpdf/include/tcpdf_static, in function fopenLocal, replace
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -192,7 +192,8 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
} elseif ($action == "setshippableiconinlist") {
|
||||
}
|
||||
elseif ($action == "setshippableiconinlist") {
|
||||
// Activate Set Shippable Icon In List
|
||||
$setshippableiconinlist = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist, 'yesno', 0, '', $conf->entity);
|
||||
@ -203,6 +204,25 @@ elseif ($action == 'set_ORDER_FREE_TEXT')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
elseif ($action == 'setribchq')
|
||||
{
|
||||
$rib = GETPOST('rib', 'alpha');
|
||||
$chq = GETPOST('chq', 'alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Activate ask for payment bank
|
||||
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
|
||||
@ -514,7 +534,122 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print "<br>";
|
||||
|
||||
|
||||
/*
|
||||
* Payment mode
|
||||
*/
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInOrder"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right">';
|
||||
if (empty($conf->facture->enabled)) {
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql .= " WHERE clos = 0";
|
||||
$sql .= " AND courant = 1";
|
||||
$sql .= " AND entity IN (".getEntity('bank_account').")";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num > 0)
|
||||
{
|
||||
print '<select name="rib" class="flat" id="rib">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<option value="'.$row[0].'"';
|
||||
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected' : '';
|
||||
print '>'.$row[1].'</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</select>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<i>".$langs->trans("NoActiveBankAccountDefined")."</i>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<select class="flat" name="chq" id="chq">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
|
||||
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
$sql .= " WHERE clos = 0";
|
||||
$sql .= " AND courant = 1";
|
||||
$sql .= " AND entity IN (".getEntity('bank_account').")";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<option value="'.$row[0].'"';
|
||||
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected' : '';
|
||||
print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
print "</select>";
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Other options
|
||||
|
||||
@ -640,7 +640,7 @@ if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) // Hidden conf
|
||||
}
|
||||
|
||||
/*
|
||||
* Modes de reglement
|
||||
* Payment modes
|
||||
*/
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"), '', '');
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -23,7 +23,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/ldap.php
|
||||
* \ingroup ldap
|
||||
* \brief Page d'administration/configuration du module Ldap
|
||||
* \brief Page to setup module LDAP
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -57,19 +57,19 @@ if (empty($reshook))
|
||||
$error=0;
|
||||
|
||||
$db->begin();
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes"), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_TYPE', GETPOST("type", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PROTOCOLVERSION', GETPOST("LDAP_SERVER_PROTOCOLVERSION", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST', GETPOST("host", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_HOST_SLAVE', GETPOST("slave", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_PORT', GETPOST("port", 'int'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_DN', GETPOST("dn", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_DN', GETPOST("admin", 'alphanohtml'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_ADMIN_PASS', GETPOST("pass", 'none'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SERVER_USE_TLS', GETPOST("usetls", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_SYNCHRO_ACTIVE', GETPOST("activesynchro", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_ACTIVE', GETPOST("activecontact", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_ACTIVE', GETPOST("activemembers", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_TYPE_ACTIVE', GETPOST("activememberstypes", 'aZ09'), 'chaine', 0, '', $conf->entity)) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@ -512,29 +512,35 @@ foreach ($dirmodels as $reldir)
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
/*
|
||||
* Payment mode
|
||||
*/
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right">';
|
||||
if (empty($conf->facture->enabled)) {
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
$sql = "SELECT rowid, label";
|
||||
@ -571,13 +577,19 @@ if (empty($conf->facture->enabled))
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("BankModuleNotActive");
|
||||
print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
|
||||
print "<td>";
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
|
||||
print "<td>";
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<select class="flat" name="chq" id="chq">';
|
||||
print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
|
||||
print '<option value="-1"'.($conf->global->FACTURE_CHQ_NUMBER ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
|
||||
@ -605,10 +617,14 @@ if (empty($conf->facture->enabled))
|
||||
}
|
||||
}
|
||||
print "</select>";
|
||||
print "</td></tr>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
}
|
||||
else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
print "</table>";
|
||||
print "</form>";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=0"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
@ -755,7 +755,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
@ -863,7 +863,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th class="liste_titre" colspan="5">'.$langs->trans("OrdersOpened").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
print '<tr class="liste_titre"><th class="liste_titre" colspan="5">'.$langs->trans("OrdersOpened").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></th></tr>';
|
||||
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
|
||||
@ -3393,8 +3393,8 @@ class Propal extends CommonObject
|
||||
$response->warning_delay = $delay_warning / 60 / 60 / 24;
|
||||
$response->label = $label;
|
||||
$response->labelShort = $labelShort;
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals';
|
||||
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
|
||||
$response->url = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals';
|
||||
$response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?search_status='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc';
|
||||
$response->img = img_object('', "propal");
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
|
||||
@ -186,7 +186,7 @@ if (!empty($conf->propal->enabled))
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
$langs->load("propal");
|
||||
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=0"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
$i = 0;
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
@ -335,7 +335,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?search_status=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
@ -423,7 +423,7 @@ if (! empty($conf->propal->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("ProposalsToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<td colspan="3">'.$langs->trans("ProposalsToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
@ -496,7 +496,7 @@ if (! empty($conf->propal->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
print '<td colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=2"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@ -89,7 +89,7 @@ $search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
||||
$search_btn = GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||
|
||||
$viewstatut = GETPOST('viewstatut', 'alpha');
|
||||
$search_status = GETPOST('search_status', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$object_statut = GETPOST('search_statut', 'alpha');
|
||||
|
||||
@ -229,13 +229,13 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_monthdelivery = '';
|
||||
$search_daydelivery = '';
|
||||
$search_availability = '';
|
||||
$viewstatut = '';
|
||||
$search_status = '';
|
||||
$object_statut = '';
|
||||
$toselect = '';
|
||||
$search_array_options = array();
|
||||
$search_categ_cus = 0;
|
||||
}
|
||||
if ($object_statut != '') $viewstatut = $object_statut;
|
||||
if ($object_statut != '') $search_status = $object_statut;
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
@ -338,9 +338,9 @@ if ($search_categ_cus == -2) $sql .= " AND cc.fk_categorie IS NULL";
|
||||
|
||||
if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$db->escape($search_product_category);
|
||||
if ($socid > 0) $sql .= ' AND s.rowid = '.$socid;
|
||||
if ($viewstatut != '' && $viewstatut != '-1')
|
||||
if ($search_status != '' && $search_status != '-1')
|
||||
{
|
||||
$sql .= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
|
||||
$sql .= ' AND p.fk_statut IN ('.$db->escape($search_status).')';
|
||||
}
|
||||
$sql .= dolSqlDateFilter("p.datep", $search_day, $search_month, $search_year);
|
||||
$sql .= dolSqlDateFilter("p.fin_validite", $search_dayfin, $search_month_end, $search_yearfin);
|
||||
@ -412,7 +412,7 @@ if ($resql)
|
||||
|
||||
llxHeader('', $langs->trans('Proposal'), $help_url);
|
||||
|
||||
$param = '&viewstatut='.urlencode($viewstatut);
|
||||
$param = '&search_status='.urlencode($search_status);
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
if ($sall) $param .= '&sall='.urlencode($sall);
|
||||
@ -706,7 +706,7 @@ if ($resql)
|
||||
if (!empty($arrayfields['p.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
$formpropal->selectProposalStatus($viewstatut, 1, 0, 1, 'customer', 'search_statut');
|
||||
$formpropal->selectProposalStatus($search_status, 1, 0, 1, 'customer', 'search_statut');
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
|
||||
@ -3527,7 +3527,7 @@ class Commande extends CommonOrder
|
||||
$response->warning_delay=$conf->commande->client->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("OrdersToProcess");
|
||||
$response->labelShort = $langs->trans("Opened");
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3&mainmenu=commercial&leftmenu=orders';
|
||||
$response->url=DOL_URL_ROOT.'/commande/list.php?search_status=-3&mainmenu=commercial&leftmenu=orders';
|
||||
$response->img=img_object('', "order");
|
||||
|
||||
$generic_commande = new Commande($this->db);
|
||||
|
||||
@ -155,7 +155,7 @@ if ($resql)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$commandestatic->LibStatut($status, $bool, 0).'</td>';
|
||||
print '<td class="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
|
||||
print '<td class="right"><a href="list.php?search_status='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
|
||||
print $commandestatic->LibStatut($status, $bool, 3);
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
@ -347,7 +347,7 @@ if (!empty($conf->commande->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
@ -429,7 +429,7 @@ if (!empty($conf->commande->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=2"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=2"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@ -80,7 +80,7 @@ $search_total_ttc = GETPOST('search_total_ttc', 'alpha');
|
||||
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$billed = GETPOST('billed', 'int');
|
||||
$viewstatut = GETPOST('viewstatut', 'int');
|
||||
$search_status = GETPOST('search_status', 'int');
|
||||
$search_btn = GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
@ -205,7 +205,7 @@ if (empty($reshook))
|
||||
$search_deliveryyear = '';
|
||||
$search_project_ref = '';
|
||||
$search_project = '';
|
||||
$viewstatut = '';
|
||||
$search_status = '';
|
||||
$billed = '';
|
||||
$toselect = '';
|
||||
$search_array_options = array();
|
||||
@ -288,23 +288,23 @@ if ($search_ref) $sql .= natural_search('c.ref', $search_ref);
|
||||
if ($search_ref_customer) $sql .= natural_search('c.ref_client', $search_ref_customer);
|
||||
if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
if ($billed != '' && $billed >= 0) $sql .= ' AND c.facture = '.$billed;
|
||||
if ($viewstatut <> '')
|
||||
if ($search_status <> '')
|
||||
{
|
||||
if ($viewstatut < 4 && $viewstatut > -3)
|
||||
if ($search_status < 4 && $search_status > -3)
|
||||
{
|
||||
if ($viewstatut == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
|
||||
else $sql .= ' AND c.fk_statut = '.$viewstatut; // brouillon, validee, en cours, annulee
|
||||
if ($search_status == 1 && empty($conf->expedition->enabled)) $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated'
|
||||
else $sql .= ' AND c.fk_statut = '.$search_status; // brouillon, validee, en cours, annulee
|
||||
}
|
||||
if ($viewstatut == 4)
|
||||
if ($search_status == 4)
|
||||
{
|
||||
$sql .= ' AND c.facture = 1'; // invoice created
|
||||
}
|
||||
if ($viewstatut == -2) // To process
|
||||
if ($search_status == -2) // To process
|
||||
{
|
||||
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
|
||||
$sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
|
||||
}
|
||||
if ($viewstatut == -3) // To bill
|
||||
if ($search_status == -3) // To bill
|
||||
{
|
||||
//$sql.= ' AND c.fk_statut in (1,2,3)';
|
||||
//$sql.= ' AND c.facture = 0'; // invoice not created
|
||||
@ -367,21 +367,21 @@ if ($resql)
|
||||
{
|
||||
$title = $langs->trans('ListOfOrders');
|
||||
}
|
||||
if (strval($viewstatut) == '0')
|
||||
if (strval($search_status) == '0')
|
||||
$title .= ' - '.$langs->trans('StatusOrderDraftShort');
|
||||
if ($viewstatut == 1)
|
||||
if ($search_status == 1)
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidatedShort');
|
||||
if ($viewstatut == 2)
|
||||
if ($search_status == 2)
|
||||
$title .= ' - '.$langs->trans('StatusOrderSentShort');
|
||||
if ($viewstatut == 3)
|
||||
if ($search_status == 3)
|
||||
$title .= ' - '.$langs->trans('StatusOrderToBillShort');
|
||||
if ($viewstatut == 4)
|
||||
if ($search_status == 4)
|
||||
$title .= ' - '.$langs->trans('StatusOrderProcessedShort');
|
||||
if ($viewstatut == -1)
|
||||
if ($search_status == -1)
|
||||
$title .= ' - '.$langs->trans('StatusOrderCanceledShort');
|
||||
if ($viewstatut == -2)
|
||||
if ($search_status == -2)
|
||||
$title .= ' - '.$langs->trans('StatusOrderToProcessShort');
|
||||
if ($viewstatut == -3)
|
||||
if ($search_status == -3)
|
||||
$title .= ' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled) ? '' : $langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill');
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
@ -404,7 +404,7 @@ if ($resql)
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
if ($sall) $param .= '&sall='.urlencode($sall);
|
||||
if ($socid > 0) $param .= '&socid='.urlencode($socid);
|
||||
if ($viewstatut != '') $param .= '&viewstatut='.urlencode($viewstatut);
|
||||
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
||||
if ($search_orderday) $param .= '&search_orderday='.urlencode($search_orderday);
|
||||
if ($search_ordermonth) $param .= '&search_ordermonth='.urlencode($search_ordermonth);
|
||||
if ($search_orderyear) $param .= '&search_orderyear='.urlencode($search_orderyear);
|
||||
@ -462,7 +462,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
|
||||
|
||||
@ -717,7 +717,7 @@ if ($resql)
|
||||
-3=>$langs->trans("StatusOrderValidatedShort").'+'.$langs->trans("StatusOrderSentShort").'+'.$langs->trans("StatusOrderDelivered"),
|
||||
Commande::STATUS_CANCELED=>$langs->trans("StatusOrderCanceledShort")
|
||||
);
|
||||
print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
||||
print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Status billed
|
||||
@ -820,7 +820,7 @@ if ($resql)
|
||||
|
||||
$generic_commande->getLinesArray(); // This set ->lines
|
||||
|
||||
print $generic_commande->getNomUrl(1, ($viewstatut != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
|
||||
print $generic_commande->getNomUrl(1, ($search_status != 2 ? 0 : $obj->fk_statut), 0, 0, 0, 1, 1);
|
||||
|
||||
// Show shippable Icon (create subloop, so may be slow)
|
||||
if ($conf->stock->enabled)
|
||||
|
||||
@ -57,7 +57,7 @@ $socid = GETPOST('socid', 'int');
|
||||
$selected = GETPOST('orders_to_invoice');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$viewstatut = GETPOST('viewstatut', 'alpha');
|
||||
$search_status = GETPOST('search_status', 'alpha');
|
||||
|
||||
$error = 0;
|
||||
|
||||
|
||||
@ -385,8 +385,8 @@ if ($result)
|
||||
print $langs->trans("VATPayment");
|
||||
print '</a>';
|
||||
}
|
||||
elseif ($links[$key]['type']=='payment_salary') {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/salaries/card.php?id='.$links[$key]['url_id'].'">';
|
||||
elseif ($links[$key]['type'] == 'payment_salary') {
|
||||
print '<a href="'.DOL_URL_ROOT.'/salaries/card.php?id='.$links[$key]['url_id'].'">';
|
||||
print img_object($langs->trans('ShowPaymentSalary'), 'payment').' ';
|
||||
print $langs->trans("SalaryPayment");
|
||||
print '</a>';
|
||||
|
||||
@ -245,7 +245,7 @@ print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bank', 0, $newcardbutton, '', $limit, 1);
|
||||
|
||||
|
||||
@ -445,8 +445,7 @@ class Invoices extends DolibarrApi
|
||||
}
|
||||
|
||||
$result = $this->invoice->delete_contact($rowid);
|
||||
|
||||
if (!$result) {
|
||||
if ($result < 0) {
|
||||
throw new RestException(500, 'Error when deleted the contact');
|
||||
}
|
||||
|
||||
@ -543,7 +542,7 @@ class Invoices extends DolibarrApi
|
||||
/**
|
||||
* Delete invoice
|
||||
*
|
||||
* @param int $id Invoice ID
|
||||
* @param int $id Invoice ID
|
||||
* @return array
|
||||
*/
|
||||
public function delete($id)
|
||||
@ -560,7 +559,8 @@ class Invoices extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
if ($this->invoice->delete($id) < 0)
|
||||
$result = $this->invoice->delete(DolibarrApiAccess::$user);
|
||||
if ($result < 0)
|
||||
{
|
||||
throw new RestException(500);
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
$title = $langs->trans("RepeatableInvoices");
|
||||
|
||||
|
||||
@ -643,7 +643,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit);
|
||||
|
||||
@ -546,8 +546,8 @@ if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->
|
||||
|
||||
|
||||
|
||||
// Last donations
|
||||
if (!empty($conf->don->enabled) && $user->rights->societe->lire)
|
||||
// Latest donations
|
||||
if (!empty($conf->don->enabled) && $user->rights->don->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
|
||||
@ -745,7 +745,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<th colspan="2">'.$langs->trans("OrdersDeliveredToBill").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=3&billed=0"><span class="badge">'.$num.'</span></a></th>';
|
||||
print '<th colspan="2">'.$langs->trans("OrdersDeliveredToBill").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=3&billed=0"><span class="badge">'.$num.'</span></a></th>';
|
||||
if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<th class="right">'.$langs->trans("AmountHT").'</th>';
|
||||
print '<th class="right">'.$langs->trans("AmountTTC").'</th>';
|
||||
print '<th class="right">'.$langs->trans("ToBill").'</th>';
|
||||
|
||||
@ -216,7 +216,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit);
|
||||
|
||||
|
||||
@ -193,7 +193,7 @@ if ($result)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
$massactionbutton = '';
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
if ($year)
|
||||
{
|
||||
|
||||
@ -79,7 +79,7 @@ if ($company->id)
|
||||
if (! $contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE");
|
||||
if (! $contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX");
|
||||
if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "TYPE=WORK;POSTAL");
|
||||
if ($company->email != $contact->email) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
|
||||
if (empty($contact->email)) $v->setEmail($company->email, 'TYPE=PREF,INTERNET');
|
||||
// Si contact lie a un tiers non de type "particulier"
|
||||
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name);
|
||||
}
|
||||
|
||||
@ -861,7 +861,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
if ($sall) $param .= '&sall='.urlencode($sall);
|
||||
if ($socid > 0) $param .= '&socid='.urlencode($socid);
|
||||
if ($viewstatut != '') $param .= '&viewstatut='.urlencode($viewstatut);
|
||||
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
||||
if ($search_orderday) $param .= '&search_orderday='.urlencode($search_orderday);
|
||||
if ($search_ordermonth) $param .= '&search_ordermonth='.urlencode($search_ordermonth);
|
||||
if ($search_orderyear) $param .= '&search_orderyear='.urlencode($search_orderyear);
|
||||
|
||||
@ -154,7 +154,7 @@ class box_activity extends ModeleBoxes
|
||||
{
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'class="left" width="16"',
|
||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
|
||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=".$data[$j]->fk_statut,
|
||||
'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
|
||||
'logo' => 'object_propal'
|
||||
);
|
||||
@ -168,7 +168,7 @@ class box_activity extends ModeleBoxes
|
||||
'td' => 'class="right"',
|
||||
'text' => $data[$j]->nb,
|
||||
'tooltip' => $langs->trans("Proposals")." ".$propalstatic->LibStatut($data[$j]->fk_statut, 0),
|
||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=".$data[$j]->fk_statut,
|
||||
'url' => DOL_URL_ROOT."/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=".$data[$j]->fk_statut,
|
||||
);
|
||||
$totalnb += $data[$j]->nb;
|
||||
|
||||
@ -236,7 +236,7 @@ class box_activity extends ModeleBoxes
|
||||
while ($j < count($data)) {
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'class="left" width="16"',
|
||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut,
|
||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=".$data[$j]->fk_statut,
|
||||
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut, 0, 0),
|
||||
'logo' => 'object_order',
|
||||
);
|
||||
@ -250,7 +250,7 @@ class box_activity extends ModeleBoxes
|
||||
'td' => 'class="right"',
|
||||
'text' => $data[$j]->nb,
|
||||
'tooltip' => $langs->trans("Orders")." ".$commandestatic->LibStatut($data[$j]->fk_statut, 0, 0),
|
||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=".$data[$j]->fk_statut,
|
||||
'url' => DOL_URL_ROOT."/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=".$data[$j]->fk_statut,
|
||||
);
|
||||
$totalnb += $data[$j]->nb;
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@ class box_birthdays extends ModeleBoxes
|
||||
$sql = "SELECT u.rowid, u.firstname, u.lastname, u.birth";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
||||
$sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
|
||||
$sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||
$sql.= " ORDER BY u.birth ASC";
|
||||
$sql.= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ class box_birthdays_members extends ModeleBoxes
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as u";
|
||||
$sql.= " WHERE u.entity IN (".getEntity('adherent').")";
|
||||
$sql.= " AND u.statut = 1";
|
||||
$sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], $tmparray['year']);
|
||||
$sql.= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0);
|
||||
$sql.= " ORDER BY u.birth ASC";
|
||||
$sql.= $this->db->plimit($max, 0);
|
||||
|
||||
|
||||
@ -1379,9 +1379,10 @@ class SMTPs
|
||||
$strContentAltText = '';
|
||||
if ($strType == 'html')
|
||||
{
|
||||
// Similar code to forge a text from html is also in CMailFile.class.php
|
||||
$strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContent);
|
||||
$strContentAltText = html_entity_decode(strip_tags($strContentAltText));
|
||||
// Similar code to forge a text from html is also in CMailFile.class.php
|
||||
$strContentAltText = preg_replace('/<head><title>.*<\/style><\/head>/', '', $strContent);
|
||||
$strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContentAltText);
|
||||
$strContentAltText = html_entity_decode(strip_tags($strContentAltText));
|
||||
$strContentAltText = trim(wordwrap($strContentAltText, 75, "\r\n"));
|
||||
}
|
||||
|
||||
|
||||
@ -301,7 +301,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $exclu
|
||||
$sqldate.= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date));
|
||||
$sqldate.= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'";
|
||||
} else
|
||||
$sqldate.= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%m') = '".$db->escape($month_date)."'";
|
||||
$sqldate.= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%c') = '".$db->escape($month_date)."'";
|
||||
} elseif ($year_date > 0){
|
||||
$sqldate.= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false));
|
||||
$sqldate.= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'";
|
||||
|
||||
@ -914,7 +914,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_
|
||||
// <img alt="" src="/dolibarr_dev/htdocs/viewimage.php?modulepart=medias&entity=1&file=image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
// become
|
||||
// <img alt="" src="'.DOL_DATA_ROOT.'/medias/image/ldestailleur_166x166.jpg" style="height:166px; width:166px" />
|
||||
$newfreetext = preg_replace('/(<img.*src=")[^\"]*viewimage\.php[^\"]*modulepart=medias[^\"]*file=([^\"]*)("[^\/]*\/>)/', '\1'.DOL_DATA_ROOT.'/medias/\2\3', $newfreetext);
|
||||
$newfreetext = preg_replace('/(<img.*src=")[^\"]*viewimage\.php[^\"]*modulepart=medias[^\"]*file=([^\"]*)("[^\/]*\/>)/', '\1'.'file:/'.DOL_DATA_ROOT.'/medias/\2\3', $newfreetext);
|
||||
|
||||
$line .= $outputlangs->convToOutputCharset($newfreetext);
|
||||
}
|
||||
|
||||
@ -141,22 +141,22 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1100__+MAX_llx_menu__, 'commercial', 'propals', 5__+MAX_llx_menu__, '/comm/propal/index.php?mainmenu=commercial&leftmenu=propals', 'Proposals', 0, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1101__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/card.php?mainmenu=commercial&action=create&leftmenu=propals', 'NewPropal', 1, 'propal', '$user->rights->propale->creer', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1102__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', 'List', 1, 'propal', '$user->rights->propale->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=0', 'PropalsDraft', 1, 'propal', '$user->rights->propale->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=1', 'PropalsOpened', 1, 'propal', '$user->rights->propale->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&viewstatut=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propale->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1103__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=0', 'PropalsDraft', 1, 'propal', '$user->rights->propale->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1104__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=1', 'PropalsOpened', 1, 'propal', '$user->rights->propale->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1105__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=2', 'PropalStatusSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1106__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=3', 'PropalStatusNotSigned', 1, 'propal', '$user->rights->propale->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled && $leftmenu=="propals"', __HANDLER__, 'left', 1107__+MAX_llx_menu__, 'commercial', '', 1102__+MAX_llx_menu__, '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals&search_status=4', 'PropalStatusBilled', 1, 'propal', '$user->rights->propale->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 1110__+MAX_llx_menu__, 'commercial', '', 1100__+MAX_llx_menu__, '/comm/propal/stats/index.php?mainmenu=commercial&leftmenu=propals', 'Statistics', 1, 'propal', '$user->rights->propale->lire', '', 2, 4, __ENTITY__);
|
||||
-- Commercial - Customer's orders
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1200__+MAX_llx_menu__, 'commercial', 'orders', 5__+MAX_llx_menu__, '/commande/index.php?mainmenu=commercial&leftmenu=orders', 'CustomersOrders', 0, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1201__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/card.php?mainmenu=commercial&action=create&leftmenu=orders', 'NewOrder', 1, 'orders', '$user->rights->commande->creer', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1202__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders', 'List', 1, 'orders', '$user->rights->commande->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1203__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=0', 'StatusOrderDraftShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1204__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=1', 'StatusOrderValidated', 1, 'orders', '$user->rights->commande->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1205__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=2', 'StatusOrderOnProcessShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1206__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=3', 'StatusOrderToBill', 1, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1207__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=4', 'StatusOrderProcessed', 1, 'orders', '$user->rights->commande->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&viewstatut=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1203__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=0', 'StatusOrderDraftShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1204__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=1', 'StatusOrderValidated', 1, 'orders', '$user->rights->commande->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1205__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=2', 'StatusOrderOnProcessShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1206__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=3', 'StatusOrderToBill', 1, 'orders', '$user->rights->commande->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1207__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=4', 'StatusOrderProcessed', 1, 'orders', '$user->rights->commande->lire', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1209__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/stats/index.php?mainmenu=commercial&leftmenu=orders', 'Statistics', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__);
|
||||
-- Commercial - Supplier's orders
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?mainmenu=commercial&leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__);
|
||||
@ -209,7 +209,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1710__+MAX_llx_menu__, 'billing', 'customers_bills_reports', 1704__+MAX_llx_menu__, '/compta/paiement/rapport.php?mainmenu=billing&leftmenu=customers_bills_reports', 'Reportings', 2, 'bills', '$user->rights->facture->lire', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1714__+MAX_llx_menu__, 'billing', 'customers_bills_stats', 1700__+MAX_llx_menu__, '/compta/facture/stats/index.php?mainmenu=billing&leftmenu=customers_bills_stats', 'Statistics', 1, 'bills', '$user->rights->facture->lire', '', 2, 8, __ENTITY__);
|
||||
-- Billing - Orders to bill
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'billing', 'orders', 6__+MAX_llx_menu__, '/commande/list.php?mainmenu=billing&leftmenu=orders&viewstatut=3', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1900__+MAX_llx_menu__, 'billing', 'orders', 6__+MAX_llx_menu__, '/commande/list.php?mainmenu=billing&leftmenu=orders&search_status=3', 'MenuOrdersToBill', 0, 'orders', '$user->rights->commande->lire', '', 0, 3, __ENTITY__);
|
||||
-- Donations
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled', __HANDLER__, 'left', 2000__+MAX_llx_menu__, 'billing', 'donations', 6__+MAX_llx_menu__, '/don/index.php?mainmenu=billing&leftmenu=donations', 'Donations', 0, 'donations', '$user->rights->don->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->don->enabled && $leftmenu=="donations"', __HANDLER__, 'left', 2001__+MAX_llx_menu__, 'billing', '', 2000__+MAX_llx_menu__, '/don/card.php?mainmenu=billing&leftmenu=donations&action=create', 'NewDonation', 1, 'donations', '$user->rights->don->creer', '', 2, 0, __ENTITY__);
|
||||
|
||||
@ -908,12 +908,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
$newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->rights->propale->creer);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->rights->propale->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") {
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=0", $langs->trans("PropalsDraft"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=1", $langs->trans("PropalsOpened"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=2", $langs->trans("PropalStatusSigned"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=3", $langs->trans("PropalStatusNotSigned"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=4", $langs->trans("PropalStatusBilled"), 2, $user->rights->propale->lire);
|
||||
//$newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->rights->propale->lire);
|
||||
$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->rights->propale->lire);
|
||||
//$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->rights->propale->lire);
|
||||
}
|
||||
$newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->rights->propale->lire);
|
||||
}
|
||||
@ -926,12 +926,12 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
$newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") {
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire);
|
||||
if (!empty($conf->expedition->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=2", $langs->trans("StatusOrderSentShort"), 2, $user->rights->commande->lire);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=3", $langs->trans("StatusOrderDelivered"), 2, $user->rights->commande->lire);
|
||||
//$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire);
|
||||
if (!empty($conf->expedition->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->rights->commande->lire);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->rights->commande->lire);
|
||||
//$newmenu->add("/commande/list.php?leftmenu=orders&search_status=4", $langs->trans("StatusOrderProcessed"), 2, $user->rights->commande->lire);
|
||||
$newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire);
|
||||
}
|
||||
$newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->rights->commande->lire);
|
||||
}
|
||||
@ -1049,7 +1049,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
if (!empty($conf->commande->enabled))
|
||||
{
|
||||
$langs->load("orders");
|
||||
if (!empty($conf->facture->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
|
||||
if (!empty($conf->facture->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
|
||||
//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
|
||||
}
|
||||
|
||||
@ -1596,9 +1596,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
$newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->rights->expedition->creer);
|
||||
$newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->rights->expedition->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") {
|
||||
$newmenu->add("/expedition/list.php?leftmenu=sendings&viewstatut=0", $langs->trans("StatusSendingDraftShort"), 2, $user->rights->expedition->lire);
|
||||
$newmenu->add("/expedition/list.php?leftmenu=sendings&viewstatut=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->rights->expedition->lire);
|
||||
$newmenu->add("/expedition/list.php?leftmenu=sendings&viewstatut=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->rights->expedition->lire);
|
||||
$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->rights->expedition->lire);
|
||||
$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->rights->expedition->lire);
|
||||
$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->rights->expedition->lire);
|
||||
}
|
||||
$newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->rights->expedition->lire);
|
||||
}
|
||||
@ -1610,9 +1610,9 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
$newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->rights->reception->lire, '', $mainmenu, 'receptions');
|
||||
$newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->rights->reception->creer);
|
||||
$newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->rights->reception->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") $newmenu->add("/reception/list.php?leftmenu=receptions&viewstatut=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->rights->reception->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") $newmenu->add("/reception/list.php?leftmenu=receptions&viewstatut=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->rights->reception->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") $newmenu->add("/reception/list.php?leftmenu=receptions&viewstatut=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->rights->reception->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->rights->reception->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->rights->reception->lire);
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->rights->reception->lire);
|
||||
$newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->rights->reception->lire);
|
||||
}
|
||||
}
|
||||
|
||||
@ -745,7 +745,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetFont('', 'B', $default_font_size + 2);
|
||||
$pdf->SetTextColor(111, 81, 124);
|
||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $object->getLibStatut(0), '', 'R');
|
||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->statuts_short[$object->status]), '', 'R');
|
||||
|
||||
if ($showaddress) {
|
||||
// Sender properties
|
||||
|
||||
@ -448,6 +448,7 @@ class modSociete extends DolibarrModules
|
||||
's.fk_multicurrency' => 'MulticurrencyUsed',
|
||||
's.multicurrency_code' => 'MulticurrencyCurrency'
|
||||
);
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES)) $this->import_fields_array[$r]['s.price_level']='PriceLevel';
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@ -925,7 +925,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
|
||||
// Show payments conditions
|
||||
if (empty($conf->global->PROPALE_PDF_HIDE_PAYMENTTERMCOND) && ($object->cond_reglement_code || $object->cond_reglement))
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement))
|
||||
{
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
@ -941,7 +941,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$posy = $pdf->GetY() + 3;
|
||||
}
|
||||
|
||||
if (empty($conf->global->PROPALE_PDF_HIDE_PAYMENTTERMMODE))
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE))
|
||||
{
|
||||
// Check a payment mode is defined
|
||||
/* Not required on a proposal
|
||||
|
||||
@ -1025,7 +1025,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
}
|
||||
|
||||
// Show payments conditions
|
||||
if (empty($conf->global->PROPALE_PDF_HIDE_PAYMENTTERMCOND) && ($object->cond_reglement_code || $object->cond_reglement))
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement))
|
||||
{
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
@ -1041,7 +1041,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$posy = $pdf->GetY() + 3;
|
||||
}
|
||||
|
||||
if (empty($conf->global->PROPALE_PDF_HIDE_PAYMENTTERMMODE))
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE))
|
||||
{
|
||||
// Check a payment mode is defined
|
||||
/* Not required on a proposal
|
||||
|
||||
@ -2553,7 +2553,7 @@ elseif ($id || $ref)
|
||||
|
||||
// This is just to generate a delivery receipt
|
||||
//var_dump($object->linkedObjectsIds['delivery']);
|
||||
if ($conf->livraison_bon->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && count($object->linkedObjectsIds['delivery']) == 0)
|
||||
if ($conf->livraison_bon->enabled && ($object->statut == Expedition::STATUS_VALIDATED || $object->statut == Expedition::STATUS_CLOSED) && $user->rights->expedition->livraison->creer && empty($object->linkedObjectsIds['delivery']))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=create_delivery">'.$langs->trans("CreateDeliveryOrder").'</a>';
|
||||
}
|
||||
|
||||
@ -450,7 +450,7 @@ class Shipments extends DolibarrApi
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if(! DolibarrApiAccess::$user->rights->shipment->supprimer) {
|
||||
if(! DolibarrApiAccess::$user->rights->expedition->supprimer) {
|
||||
throw new RestException(401);
|
||||
}
|
||||
$result = $this->shipment->fetch($id);
|
||||
|
||||
@ -73,7 +73,7 @@ $offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
$viewstatut = GETPOST('viewstatut');
|
||||
$search_status = GETPOST('search_status');
|
||||
|
||||
$diroutputmassaction = $conf->expedition->dir_output.'/sending/temp/massgeneration/'.$user->id;
|
||||
|
||||
@ -156,7 +156,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_country = '';
|
||||
$search_type_thirdparty = '';
|
||||
$search_billed = '';
|
||||
$viewstatut = '';
|
||||
$search_status = '';
|
||||
$toselect = '';
|
||||
$search_array_options = array();
|
||||
}
|
||||
@ -221,8 +221,8 @@ if ($socid)
|
||||
{
|
||||
$sql .= " AND e.fk_soc = ".$socid;
|
||||
}
|
||||
if ($viewstatut <> '' && $viewstatut >= 0) {
|
||||
$sql .= " AND e.fk_statut = ".$viewstatut;
|
||||
if ($search_status <> '' && $search_status >= 0) {
|
||||
$sql .= " AND e.fk_statut = ".$search_status;
|
||||
}
|
||||
if ($search_ref_customer != '') $sql .= natural_search('e.ref_customer', $search_ref_customer);
|
||||
if ($search_billed != '' && $search_billed >= 0) $sql .= ' AND e.billed = '.$search_billed;
|
||||
@ -280,7 +280,7 @@ if ($resql)
|
||||
if ($search_company) $param .= "&search_company=".urlencode($search_company);
|
||||
if ($search_town) $param .= '&search_town='.urlencode($search_town);
|
||||
if ($search_zip) $param .= '&search_zip='.urlencode($search_zip);
|
||||
if ($viewstatut != '') $param .= '&viewstatut='.urlencode($viewstatut);
|
||||
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
||||
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
@ -428,7 +428,7 @@ if ($resql)
|
||||
if (!empty($arrayfields['e.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
print $form->selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $viewstatut, 1);
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $search_status, 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Status billed
|
||||
|
||||
@ -157,7 +157,7 @@ if ($resql)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$fichinterstatic->LibStatut($status, $bool, 0).'</td>';
|
||||
print '<td class="right"><a href="list.php?viewstatut='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
|
||||
print '<td class="right"><a href="list.php?search_status='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
|
||||
print $fichinterstatic->LibStatut($status, $bool, 3);
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
@ -318,7 +318,7 @@ if (!empty($conf->ficheinter->enabled))
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("FichinterToProcess").' <a href="'.DOL_URL_ROOT.'/fichinter/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("FichinterToProcess").' <a href="'.DOL_URL_ROOT.'/fichinter/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@ -977,6 +977,15 @@ class FactureFournisseur extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error && empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($this->array_options) && count($this->array_options)>0)
|
||||
{
|
||||
$result=$this->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$notrigger)
|
||||
|
||||
@ -409,7 +409,7 @@ $num = $db->num_rows($resql);
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?viewstatut=1">('.$num.')</a></th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status=1">('.$num.')</a></th></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
|
||||
@ -87,7 +87,7 @@ $search_btn = GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||
|
||||
$status = GETPOST('statut', 'alpha');
|
||||
$viewstatut = GETPOST('viewstatut');
|
||||
$search_status = GETPOST('search_status');
|
||||
|
||||
// Security check
|
||||
$orderid = GETPOST('orderid', 'int');
|
||||
@ -649,7 +649,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit);
|
||||
|
||||
$topicmail = "SendOrderRef";
|
||||
|
||||
@ -58,7 +58,7 @@ $socid = GETPOST('socid', 'int');
|
||||
$selected = GETPOST('orders_to_invoice');
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
$viewstatut = GETPOST('viewstatut');
|
||||
$search_status = GETPOST('search_status');
|
||||
|
||||
if (!$sortfield)
|
||||
$sortfield = 'c.rowid';
|
||||
|
||||
@ -488,7 +488,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
|
||||
print_barre_liste($langs->trans("BillsSuppliers").($socid ? ' '.$soc->name : ''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit);
|
||||
|
||||
@ -18888,8 +18888,21 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
$imgsrc = '@'.base64_decode(substr($imgsrc, 1));
|
||||
$type = '';
|
||||
} else {
|
||||
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
// fix image path
|
||||
// @CHANGE LDR Add support for src="file://..." links
|
||||
if (strpos($imgsrc, 'file://') === 0) {
|
||||
$imgsrc = str_replace('file://', '/', $imgsrc);
|
||||
$imgsrc = urldecode($imgsrc);
|
||||
$testscrtype = @parse_url($imgsrc);
|
||||
if (empty($testscrtype['query'])) {
|
||||
// convert URL to server path
|
||||
$imgsrc = str_replace(K_PATH_URL, K_PATH_MAIN, $imgsrc);
|
||||
} elseif (preg_match('|^https?://|', $imgsrc) !== 1) {
|
||||
// convert URL to server path
|
||||
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
|
||||
}
|
||||
}
|
||||
elseif (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
|
||||
// fix image path
|
||||
$findroot = strpos($imgsrc, $_SERVER['DOCUMENT_ROOT']);
|
||||
if (($findroot === false) OR ($findroot > 1)) {
|
||||
if (substr($_SERVER['DOCUMENT_ROOT'], -1) == '/') {
|
||||
@ -18908,6 +18921,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
|
||||
$imgsrc = str_replace(K_PATH_MAIN, K_PATH_URL, $imgsrc);
|
||||
}
|
||||
}
|
||||
|
||||
// get image type
|
||||
$type = TCPDF_IMAGES::getImageFileType($imgsrc);
|
||||
}
|
||||
|
||||
@ -212,6 +212,7 @@ CompatibleUpTo=Compatible with version %s
|
||||
NotCompatible=This module does not seem compatible with your Dolibarr %s (Min %s - Max %s).
|
||||
CompatibleAfterUpdate=This module requires an update to your Dolibarr %s (Min %s - Max %s).
|
||||
SeeInMarkerPlace=See in Market place
|
||||
SeeSetupOfModule=See setup of module %s
|
||||
Updated=Updated
|
||||
Nouveauté=Novelty
|
||||
AchatTelechargement=Buy / Download
|
||||
@ -1296,7 +1297,7 @@ BillsPDFModules=Invoice documents models
|
||||
BillsPDFModulesAccordindToInvoiceType=Invoice documents models according to invoice type
|
||||
PaymentsPDFModules=Payment documents models
|
||||
ForceInvoiceDate=Force invoice date to validation date
|
||||
SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined for invoice
|
||||
SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined on the invoice
|
||||
SuggestPaymentByRIBOnAccount=Suggest payment by withdrawal on account
|
||||
SuggestPaymentByChequeToAddress=Suggest payment by check to
|
||||
FreeLegalTextOnInvoices=Free text on invoices
|
||||
@ -1308,7 +1309,7 @@ SupplierPaymentSetup=Vendor payments setup
|
||||
PropalSetup=Commercial proposals module setup
|
||||
ProposalsNumberingModules=Commercial proposal numbering models
|
||||
ProposalsPDFModules=Commercial proposal documents models
|
||||
SuggestedPaymentModesIfNotDefinedInProposal=Suggested payments mode on proposal by default if not defined for proposal
|
||||
SuggestedPaymentModesIfNotDefinedInProposal=Suggested payments mode on proposal by default if not defined on the proposal
|
||||
FreeLegalTextOnProposal=Free text on commercial proposals
|
||||
WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty)
|
||||
BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal
|
||||
@ -1323,6 +1324,7 @@ WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Ask for Warehouse Source for order
|
||||
##### Suppliers Orders #####
|
||||
BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Ask for bank account destination of purchase order
|
||||
##### Orders #####
|
||||
SuggestedPaymentModesIfNotDefinedInOrder=Suggested payments mode on sale order by default if not defined on the order
|
||||
OrdersSetup=Sales Orders management setup
|
||||
OrdersNumberingModules=Orders numbering models
|
||||
OrdersModelModule=Order documents models
|
||||
|
||||
@ -68,4 +68,4 @@ ToOfferALinkForTestWebhook=Link to setup Stripe WebHook to call the IPN (test mo
|
||||
ToOfferALinkForLiveWebhook=Link to setup Stripe WebHook to call the IPN (live mode)
|
||||
PaymentWillBeRecordedForNextPeriod=Payment will be recorded for the next period.
|
||||
ClickHereToTryAgain=<a href="%s">Click here to try again...</a>
|
||||
CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authenticatin rules, creation of a card must be done from Stripe backoffice. You can click here to switch on Stripe customer record: %s
|
||||
CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authentication rules, creation of a card must be done from Stripe backoffice. You can click here to switch on Stripe customer record: %s
|
||||
@ -167,7 +167,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -112,7 +112,7 @@ class mymodulewidget1 extends ModeleBoxes
|
||||
// Use configuration value for max lines count
|
||||
$this->max = $max;
|
||||
|
||||
//include_once DOL_DOCUMENT_ROOT . "/mymodule/class/mymodule.class.php";
|
||||
//dol_include_once("/mymodule/class/mymodule.class.php");
|
||||
|
||||
// Populate the head at runtime
|
||||
$text = $langs->trans("MyModuleBoxDescription", $max);
|
||||
|
||||
@ -4683,11 +4683,12 @@ class Product extends CommonObject
|
||||
* This function need a lot of load. If you use it on list, use a cache to execute it once for each product id.
|
||||
* If ENTREPOT_EXTRA_STATUS set, filtering on warehouse status possible.
|
||||
*
|
||||
* @param string $option '' = Load all stock info, also from closed and internal warehouses, 'nobatch', 'novirtual'
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
* @see load_virtual_stock(), loadBatchInfo()
|
||||
* @param string $option '' = Load all stock info, also from closed and internal warehouses, 'nobatch', 'novirtual'
|
||||
* @param int $includedraftpoforvirtual Include draft status of PO for virtual stock calculation
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
* @see load_virtual_stock(), loadBatchInfo()
|
||||
*/
|
||||
public function load_stock($option = '')
|
||||
public function load_stock($option = '', $includedraftpoforvirtual = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
@ -4740,7 +4741,7 @@ class Product extends CommonObject
|
||||
$this->db->free($result);
|
||||
|
||||
if (!preg_match('/novirtual/', $option)) {
|
||||
$this->load_virtual_stock(); // This also load stats_commande_fournisseur, ...
|
||||
$this->load_virtual_stock($includedraftpoforvirtual); // This also load stats_commande_fournisseur, ...
|
||||
}
|
||||
|
||||
return 1;
|
||||
@ -4755,13 +4756,14 @@ class Product extends CommonObject
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Load value ->stock_theorique of a product. Property this->id must be defined.
|
||||
* This function need a lot of load. If you use it on list, use a cache to execute it one for each product id.
|
||||
* Load value ->stock_theorique of a product. Property this->id must be defined.
|
||||
* This function need a lot of load. If you use it on list, use a cache to execute it one for each product id.
|
||||
*
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
* @see load_stock(), loadBatchInfo()
|
||||
* @param int $includedraftpoforvirtual Include draft status of PO for virtual stock calculation
|
||||
* @return int < 0 if KO, > 0 if OK
|
||||
* @see load_stock(), loadBatchInfo()
|
||||
*/
|
||||
public function load_virtual_stock()
|
||||
public function load_virtual_stock($includedraftpoforvirtual = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $hookmanager, $action;
|
||||
@ -4793,19 +4795,25 @@ class Product extends CommonObject
|
||||
}
|
||||
if (!empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$result = $this->load_stats_commande_fournisseur(0, '1,2,3,4', 1);
|
||||
$filterStatus = '1,2,3,4';
|
||||
if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus;
|
||||
$result = $this->load_stats_commande_fournisseur(0, $filterStatus, 1);
|
||||
if ($result < 0) dol_print_error($this->db, $this->error);
|
||||
$stock_commande_fournisseur = $this->stats_commande_fournisseur['qty'];
|
||||
}
|
||||
if (!empty($conf->fournisseur->enabled) && empty($conf->reception->enabled))
|
||||
{
|
||||
$result = $this->load_stats_reception(0, '4', 1);
|
||||
$filterStatus = '4';
|
||||
if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus;
|
||||
$result = $this->load_stats_reception(0, $filterStatus, 1);
|
||||
if ($result < 0) dol_print_error($this->db, $this->error);
|
||||
$stock_reception_fournisseur = $this->stats_reception['qty'];
|
||||
}
|
||||
if (!empty($conf->fournisseur->enabled) && !empty($conf->reception->enabled))
|
||||
{
|
||||
$result = $this->load_stats_reception(0, '4', 1); // Use same tables than when module reception is not used.
|
||||
$filterStatus = '4';
|
||||
if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus;
|
||||
$result = $this->load_stats_reception(0, $filterStatus, 1); // Use same tables than when module reception is not used.
|
||||
if ($result < 0) dol_print_error($this->db, $this->error);
|
||||
$stock_reception_fournisseur = $this->stats_reception['qty'];
|
||||
}
|
||||
@ -4847,7 +4855,7 @@ class Product extends CommonObject
|
||||
$hookmanager = new HookManager($this->db);
|
||||
}
|
||||
$hookmanager->initHooks(array('productdao'));
|
||||
$parameters = array('id'=>$this->id);
|
||||
$parameters = array('id'=>$this->id, 'includedraftpoforvirtual' => $includedraftpoforvirtual);
|
||||
// Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('loadvirtualstock', $parameters, $this, $action);
|
||||
if ($reshook > 0) $this->stock_theorique = $hookmanager->resArray['stock_theorique'];
|
||||
|
||||
@ -648,7 +648,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
||||
if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0)
|
||||
{
|
||||
$prod->fetch($objp->rowid);
|
||||
$prod->load_stock('warehouseopen, warehouseinternal');
|
||||
$prod->load_stock('warehouseopen, warehouseinternal', $draftchecked);
|
||||
|
||||
// Multilangs
|
||||
if (!empty($conf->global->MAIN_MULTILANGS))
|
||||
|
||||
@ -609,7 +609,7 @@ class Project extends CommonObject
|
||||
}
|
||||
elseif ($type == 'loan')
|
||||
{
|
||||
$sql = 'SELECT l.rowid, l.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').")";
|
||||
$sql = 'SELECT l.rowid, l.fk_user_author as fk_user FROM '.MAIN_DB_PREFIX."loan as l WHERE l.entity IN (".getEntity('loan').") AND l.fk_projet IN (".$ids.")";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
|
||||
@ -206,6 +206,8 @@ class Reception extends CommonObject
|
||||
$this->brouillon = 1;
|
||||
$this->tracking_number = dol_sanitizeFileName($this->tracking_number);
|
||||
if (empty($this->fk_project)) $this->fk_project = 0;
|
||||
if (empty($this->weight_units)) $this->weight_units = 0;
|
||||
if (empty($this->size_units)) $this->size_units = 0;
|
||||
|
||||
$this->user = $user;
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ $pagenext = $page + 1;
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$contextpage = 'receptionlist';
|
||||
|
||||
$viewstatut = GETPOST('viewstatut');
|
||||
$search_status = GETPOST('search_status');
|
||||
|
||||
$object = new Reception($db);
|
||||
|
||||
@ -149,7 +149,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
||||
$search_country = '';
|
||||
$search_type_thirdparty = '';
|
||||
$search_billed = '';
|
||||
$viewstatut = '';
|
||||
$search_status = '';
|
||||
$search_array_options = array();
|
||||
}
|
||||
|
||||
@ -453,8 +453,8 @@ if ($socid)
|
||||
{
|
||||
$sql .= " AND e.fk_soc = ".$socid;
|
||||
}
|
||||
if ($viewstatut <> '' && $viewstatut >= 0) {
|
||||
$sql .= " AND e.fk_statut = ".$viewstatut;
|
||||
if ($search_status <> '' && $search_status >= 0) {
|
||||
$sql .= " AND e.fk_statut = ".$search_status;
|
||||
}
|
||||
if ($search_billed != '' && $search_billed >= 0) $sql .= ' AND e.billed = '.$search_billed;
|
||||
if ($search_town) $sql .= natural_search('s.town', $search_town);
|
||||
@ -519,7 +519,7 @@ if ($resql)
|
||||
if ($search_town) $param .= "&search_town=".$search_town;
|
||||
if ($search_zip) $param .= "&search_zip=".$search_zip;
|
||||
if ($search_state) $param .= "&search_state=".$search_state;
|
||||
if ($viewstatut) $param .= "&viewstatut=".$viewstatut;
|
||||
if ($search_status) $param .= "&search_status=".$search_status;
|
||||
if ($search_country) $param .= "&search_country=".$search_country;
|
||||
if ($search_type_thirdparty) $param .= "&search_type_thirdparty=".$search_type_thirdparty;
|
||||
if ($search_ref_supplier) $param .= "&search_ref_supplier=".$search_ref_supplier;
|
||||
@ -716,7 +716,7 @@ if ($resql)
|
||||
if (!empty($arrayfields['e.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre maxwidthonsmartphone right">';
|
||||
print $form->selectarray('viewstatut', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $viewstatut, 1);
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('StatusReceptionDraftShort'), '1'=>$langs->trans('StatusReceptionValidatedShort'), '2'=>$langs->trans('StatusReceptionProcessedShort')), $search_status, 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Status billed
|
||||
|
||||
@ -2313,7 +2313,7 @@ class SupplierProposal extends CommonObject
|
||||
$response->warning_delay = $delay_warning/60/60/24;
|
||||
$response->label = $label;
|
||||
$response->labelShort = $labelShort;
|
||||
$response->url = DOL_URL_ROOT.'/supplier_proposal/list.php?viewstatut='.$status;
|
||||
$response->url = DOL_URL_ROOT.'/supplier_proposal/list.php?search_status='.$status;
|
||||
$response->img = img_object('', "propal");
|
||||
|
||||
// This assignment in condition is not a bug. It allows walking the results.
|
||||
|
||||
@ -322,7 +322,7 @@ if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposa
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("RequestsOpened").' <a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?viewstatut=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
print '<tr class="liste_titre"><th colspan="5">'.$langs->trans("RequestsOpened").' <a href="'.DOL_URL_ROOT.'/supplier_proposal/list.php?search_status=1"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
$nbofloop = min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||
while ($i < $nbofloop)
|
||||
|
||||
@ -68,7 +68,7 @@ $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
|
||||
$search_montant_ht = GETPOST('search_montant_ht', 'alpha');
|
||||
$search_montant_vat = GETPOST('search_montant_vat', 'alpha');
|
||||
$search_montant_ttc = GETPOST('search_montant_ttc', 'alpha');
|
||||
$search_status = GETPOST('viewstatut', 'alpha') ?GETPOST('viewstatut', 'alpha') : GETPOST('search_status', 'int');
|
||||
$search_status = GETPOST('search_status', 'alpha') ?GETPOST('search_status', 'alpha') : GETPOST('search_status', 'int');
|
||||
$object_statut = $db->escape(GETPOST('supplier_proposal_statut'));
|
||||
$search_btn = GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user