Uniformize code
This commit is contained in:
parent
5d5cfd498a
commit
5df193ec93
@ -97,7 +97,12 @@ if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
|
||||
// Search contract
|
||||
if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
|
||||
{
|
||||
$listofsearchfields['search_contract']=array('text'=>'Contrat');
|
||||
$listofsearchfields['search_contract']=array('text'=>'Contrat');
|
||||
}
|
||||
// Search contract
|
||||
if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire)
|
||||
{
|
||||
$listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort');
|
||||
}
|
||||
|
||||
if (count($listofsearchfields))
|
||||
|
||||
@ -74,6 +74,11 @@ if (GETPOST('search_supplier_invoice') != '')
|
||||
header("Location: ".DOL_URL_ROOT.'/fourn/facture/list.php?sall='.urlencode(GETPOST('search_supplier_invoice')));
|
||||
exit;
|
||||
}
|
||||
if (GETPOST('search_supplier_proposal') != '')
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/supplier_proposal/list.php?sall='.urlencode(GETPOST('search_supplier_proposal')));
|
||||
exit;
|
||||
}
|
||||
if (GETPOST('search_donation') != '')
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/don/list.php?sall='.urlencode(GETPOST('search_donation')));
|
||||
|
||||
@ -150,7 +150,7 @@ class InterfaceDemo extends DolibarrTriggers
|
||||
case 'LINEPROPAL_UPDATE':
|
||||
case 'LINEPROPAL_DELETE':
|
||||
|
||||
// Askpricesupplier
|
||||
// SupplierProposal
|
||||
case 'SUPPLIER_PROPOSAL_CREATE':
|
||||
case 'SUPPLIER_PROPOSAL_CLONE':
|
||||
case 'SUPPLIER_PROPOSAL_MODIFY':
|
||||
|
||||
@ -131,7 +131,7 @@ if ($resql)
|
||||
{
|
||||
print '<tr class="impair"><td align="center" colspan="2">';
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',1);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',1,'',0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
//if ($totalinprocess != $total)
|
||||
|
||||
@ -11,10 +11,12 @@ DraftRequests=Draft requests
|
||||
LastModifiedRequests=Last %s modified price requests
|
||||
RequestsOpened=Open price requests
|
||||
SupplierProposalArea=Supplier proposals area
|
||||
Askpricesupplier=Supplier proposals
|
||||
SupplierProposal=Supplier proposal
|
||||
SupplierProposalShort=Supplier proposal
|
||||
SupplierProposals=Supplier proposals
|
||||
NewAskPrice=New price request
|
||||
NewAsk=New request
|
||||
ShowAskpricesupplier=Show price request
|
||||
ShowSupplierProposal=Show price request
|
||||
AddSupplierProposal=Create a price request
|
||||
SupplierProposalRefFourn=Supplier ref
|
||||
SupplierProposalDate=Delivery date
|
||||
@ -25,22 +27,22 @@ DateAsk=Date of request
|
||||
DeleteAsk=Delete request
|
||||
ValidateAsk=Validate request
|
||||
AddAsk=Create a request
|
||||
AskpricesupplierDraft=Drafts
|
||||
AskpricesupplierOpened=Open
|
||||
AskpricesupplierStatusDraft=Draft (needs to be validated)
|
||||
AskpricesupplierStatusValidated=Validated (request is open)
|
||||
AskpricesupplierStatusOpened=Validated (request is open)
|
||||
AskpricesupplierStatusClosed=Closed
|
||||
AskpricesupplierStatusSigned=Accepted
|
||||
AskpricesupplierStatusNotSigned=Refused
|
||||
AskpricesupplierStatusBilled=Billed
|
||||
AskpricesupplierStatusDraftShort=Draft
|
||||
AskpricesupplierStatusValidatedShort=Validated
|
||||
AskpricesupplierStatusOpenedShort=Open
|
||||
AskpricesupplierStatusClosedShort=Closed
|
||||
AskpricesupplierStatusSignedShort=Accepted
|
||||
AskpricesupplierStatusNotSignedShort=Refused
|
||||
AskpricesupplierStatusBilledShort=Billed
|
||||
SupplierProposalDraft=Drafts
|
||||
SupplierProposalOpened=Open
|
||||
SupplierProposalStatusDraft=Draft (needs to be validated)
|
||||
SupplierProposalStatusValidated=Validated (request is open)
|
||||
SupplierProposalStatusOpened=Validated (request is open)
|
||||
SupplierProposalStatusClosed=Closed
|
||||
SupplierProposalStatusSigned=Accepted
|
||||
SupplierProposalStatusNotSigned=Refused
|
||||
SupplierProposalStatusBilled=Billed
|
||||
SupplierProposalStatusDraftShort=Draft
|
||||
SupplierProposalStatusValidatedShort=Validated
|
||||
SupplierProposalStatusOpenedShort=Open
|
||||
SupplierProposalStatusClosedShort=Closed
|
||||
SupplierProposalStatusSignedShort=Accepted
|
||||
SupplierProposalStatusNotSignedShort=Refused
|
||||
SupplierProposalStatusBilledShort=Billed
|
||||
CopyAskFrom=Create price request by copying existing a request
|
||||
CreateEmptyAsk=Create blank request
|
||||
CloneAsk=Clone price request
|
||||
|
||||
@ -11,10 +11,10 @@ DraftRequests=Demandes brouillons
|
||||
LastModifiedRequests=Les %s dernières demandes de prix modifiées
|
||||
RequestsOpened=Demandes de prix ouvertes
|
||||
SupplierProposalArea=Espace des demandes de prix fournisseurs
|
||||
Askpricesupplier=Demande de prix fournisseur
|
||||
SupplierProposal=Demande de prix fournisseur
|
||||
NewAskPrice=Nouvelle demande de prix
|
||||
NewAsk=Nouvelle demande
|
||||
ShowAskpricesupplier=Afficher la demande de prix
|
||||
ShowSupplierProposal=Afficher la demande de prix
|
||||
AddSupplierProposal=Créer une demande de prix
|
||||
SupplierProposalRefFourn=Réf. fournisseur
|
||||
SupplierProposalDate=Date de livraison
|
||||
@ -25,20 +25,20 @@ DateAsk=Date de demande
|
||||
DeleteAsk=Supprimer demande
|
||||
ValidateAsk=Valider demande
|
||||
AddAsk=Créer une demande
|
||||
AskpricesupplierDraft=Brouillons
|
||||
AskpricesupplierOpened=Ouvertes
|
||||
AskpricesupplierStatusDraft=Brouillon (à valider)
|
||||
AskpricesupplierStatusValidated=Validée (demande ouverte)
|
||||
AskpricesupplierStatusOpened=Validée (demande ouverte)
|
||||
AskpricesupplierStatusClosed=Fermée
|
||||
AskpricesupplierStatusSigned=Acceptée
|
||||
AskpricesupplierStatusNotSigned=Refusée
|
||||
AskpricesupplierStatusDraftShort=Brouillon
|
||||
AskpricesupplierStatusValidatedShort=Validée
|
||||
AskpricesupplierStatusOpenedShort=Ouverte
|
||||
AskpricesupplierStatusClosedShort=Fermée
|
||||
AskpricesupplierStatusSignedShort=Acceptée
|
||||
AskpricesupplierStatusNotSignedShort=Refusée
|
||||
SupplierProposalDraft=Brouillons
|
||||
SupplierProposalOpened=Ouvertes
|
||||
SupplierProposalStatusDraft=Brouillon (à valider)
|
||||
SupplierProposalStatusValidated=Validée (demande ouverte)
|
||||
SupplierProposalStatusOpened=Validée (demande ouverte)
|
||||
SupplierProposalStatusClosed=Fermée
|
||||
SupplierProposalStatusSigned=Acceptée
|
||||
SupplierProposalStatusNotSigned=Refusée
|
||||
SupplierProposalStatusDraftShort=Brouillon
|
||||
SupplierProposalStatusValidatedShort=Validée
|
||||
SupplierProposalStatusOpenedShort=Ouverte
|
||||
SupplierProposalStatusClosedShort=Fermée
|
||||
SupplierProposalStatusSignedShort=Acceptée
|
||||
SupplierProposalStatusNotSignedShort=Refusée
|
||||
CopyAskFrom=Créer demande/devis par recopie d'une demande existante
|
||||
CreateEmptyAsk=Créer demande/devis vierge
|
||||
CloneAsk=Cloner demande de prix
|
||||
|
||||
@ -1607,8 +1607,8 @@ if ($action == 'create')
|
||||
$form_close .= '<input type="hidden" name="action" value="setstatut">';
|
||||
$form_close .= '<select id="statut" name="statut" class="flat">';
|
||||
$form_close .= '<option value="0"> </option>';
|
||||
$form_close .= '<option value="2">' . $langs->trans('AskpricesupplierStatusSigned') . '</option>';
|
||||
$form_close .= '<option value="3">' . $langs->trans('AskpricesupplierStatusNotSigned') . '</option>';
|
||||
$form_close .= '<option value="2">' . $langs->trans('SupplierProposalStatusSigned') . '</option>';
|
||||
$form_close .= '<option value="3">' . $langs->trans('SupplierProposalStatusNotSigned') . '</option>';
|
||||
$form_close .= '</select>';
|
||||
$form_close .= '</td></tr>';
|
||||
$form_close .= '<tr><td width="150" align="left">' . $langs->trans('Note') . '</td><td align="left"><textarea cols="70" rows="' . ROWS_3 . '" wrap="soft" name="note">';
|
||||
|
||||
@ -151,16 +151,16 @@ class SupplierProposal extends CommonObject
|
||||
$this->remise_absolue = 0;
|
||||
|
||||
$langs->load("supplier_proposal");
|
||||
$this->labelstatut[0]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFT_LABEL : $langs->trans("AskpricesupplierStatusDraft"));
|
||||
$this->labelstatut[1]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_VALIDATED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_VALIDATED_LABEL : $langs->trans("AskpricesupplierStatusValidated"));
|
||||
$this->labelstatut[2]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNED_LABEL : $langs->trans("AskpricesupplierStatusSigned"));
|
||||
$this->labelstatut[3]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNED_LABEL : $langs->trans("AskpricesupplierStatusNotSigned"));
|
||||
$this->labelstatut[4]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_BILLED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_BILLED_LABEL : $langs->trans("AskpricesupplierStatusBilled"));
|
||||
$this->labelstatut_short[0]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFTSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFTSHORT_LABEL : $langs->trans("AskpricesupplierStatusDraftShort"));
|
||||
$this->labelstatut[0]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFT_LABEL : $langs->trans("SupplierProposalStatusDraft"));
|
||||
$this->labelstatut[1]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_VALIDATED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_VALIDATED_LABEL : $langs->trans("SupplierProposalStatusValidated"));
|
||||
$this->labelstatut[2]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNED_LABEL : $langs->trans("SupplierProposalStatusSigned"));
|
||||
$this->labelstatut[3]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNED_LABEL : $langs->trans("SupplierProposalStatusNotSigned"));
|
||||
$this->labelstatut[4]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_BILLED_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_BILLED_LABEL : $langs->trans("SupplierProposalStatusBilled"));
|
||||
$this->labelstatut_short[0]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFTSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_DRAFTSHORT_LABEL : $langs->trans("SupplierProposalStatusDraftShort"));
|
||||
$this->labelstatut_short[1]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_VALIDATEDSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_VALIDATEDSHORT_LABEL : $langs->trans("Opened"));
|
||||
$this->labelstatut_short[2]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNEDSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNEDSHORT_LABEL : $langs->trans("AskpricesupplierStatusSignedShort"));
|
||||
$this->labelstatut_short[3]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNEDSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNEDSHORT_LABEL : $langs->trans("AskpricesupplierStatusNotSignedShort"));
|
||||
$this->labelstatut_short[4]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_BILLEDSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_BILLEDSHORT_LABEL : $langs->trans("AskpricesupplierStatusBilledShort"));
|
||||
$this->labelstatut_short[2]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNEDSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_SIGNEDSHORT_LABEL : $langs->trans("SupplierProposalStatusSignedShort"));
|
||||
$this->labelstatut_short[3]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNEDSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_NOTSIGNEDSHORT_LABEL : $langs->trans("SupplierProposalStatusNotSignedShort"));
|
||||
$this->labelstatut_short[4]=(! empty($conf->global->SUPPLIER_PROPOSAL_STATUS_BILLEDSHORT_LABEL) ? $conf->global->SUPPLIER_PROPOSAL_STATUS_BILLEDSHORT_LABEL : $langs->trans("SupplierProposalStatusBilledShort"));
|
||||
}
|
||||
|
||||
|
||||
@ -627,7 +627,7 @@ class SupplierProposal extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::updateline Erreur -2 Askpricesupplier en mode incompatible pour cette action");
|
||||
dol_syslog(get_class($this)."::updateline Erreur -2 SupplierProposal en mode incompatible pour cette action");
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
@ -2259,7 +2259,7 @@ class SupplierProposal extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowAskpricesupplier").': '.$this->ref;
|
||||
$label=$langs->trans("ShowSupplierProposal").': '.$this->ref;
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
if ($option == '') {
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/supplier_proposal/card.php?id='.$this->id. $get_params .$linkclose;
|
||||
|
||||
@ -133,7 +133,7 @@ if ($resql)
|
||||
{
|
||||
print '<tr '.$bc[false].'><td align="center" colspan="2">';
|
||||
$data=array('series'=>$dataseries);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',1);
|
||||
dol_print_graph('stats',300,180,$data,1,'pie',1,'',0);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -25,9 +25,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/propal/list.php
|
||||
* \ingroup propal
|
||||
* \brief Page of commercial proposals card and list
|
||||
* \file htdocs/supplier_proposal/list.php
|
||||
* \ingroup supplier_proposal
|
||||
* \brief Page of supplier proposals card and list
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -96,6 +96,16 @@ if (GETPOST("button_removefilter") || GETPOST("button_removefilter_x")) // Both
|
||||
if($object_statut != '')
|
||||
$viewstatut=$object_statut;
|
||||
|
||||
// List of fields to search into when doing a "search in all"
|
||||
$fieldstosearchall = array(
|
||||
'p.ref'=>'Ref',
|
||||
's.nom'=>'Supplier',
|
||||
'pd.description'=>'Description',
|
||||
'p.note_private'=>"NotePrivate",
|
||||
'p.note_public'=>'NotePublic',
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('supplier_proposallist'));
|
||||
@ -175,7 +185,7 @@ if ($search_montant_ht)
|
||||
$sql.= " AND p.total_ht='".$db->escape(price2num(trim($search_montant_ht)))."'";
|
||||
}
|
||||
if ($sall) {
|
||||
$sql .= natural_search(array('s.nom', 'p.note_private', 'p.note_public', 'pd.description'), $sall);
|
||||
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
}
|
||||
if ($socid) $sql.= ' AND s.rowid = '.$socid;
|
||||
if ($viewstatut <> '')
|
||||
@ -240,7 +250,19 @@ if ($result)
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||
//sort($fieldstosearchall);
|
||||
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
||||
$moreforfilter='';
|
||||
@ -276,7 +298,7 @@ if ($result)
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Supplier'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('SupplierProposalDate'),$_SERVER["PHP_SELF"],'p.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="center"',$sortfield,$sortorder);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user