';
print ' ';
@@ -1588,7 +1297,7 @@ if ($action == 'create')
// array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
// array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' =>
// 1),
- array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)')));
+ array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=1')));
// Paiement incomplet. On demande si motif = escompte ou autre
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneAsk'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
@@ -1608,7 +1317,7 @@ if ($action == 'create')
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1);
}
- // Confirm validate proposal
+ // Confirm validate askprice
else if ($action == 'validate') {
$error = 0;
@@ -1654,123 +1363,10 @@ if ($action == 'create')
print '
';
- */
-
- // Shipping Method
- /* PHFAVRE retrait en temporaire
- if (! empty($conf->expedition->enabled)) {
- print '
';
- }
- */
-
- // Origin of demand
- /* PHFAVRE retrait en temporaire
- print '
';
// Project
-
if (! empty($conf->projet->enabled)) {
$langs->load("projects");
print '
';
@@ -2056,24 +1588,6 @@ if ($action == 'create')
}
}
-
- /*
- // Form to add new line
- if ($object->statut == 0 && $user->rights->askpricesupplier->creer)
- {
- // Add free products/services form
- global $forceall, $senderissupplier, $dateSelector;
- $forceall=1; $senderissupplier=1; $dateSelector=0;
-
- $var = true;
-
- // Add free products/services
- $object->formAddObjectLine(1, $mysoc, $object);
-
- $parameters = array();
- $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- }
- */
print '';
print "\n";
@@ -2132,11 +1646,7 @@ if ($action == 'create')
print '';
// else print ''.$langs->trans('Validate').'';
}
- // Create event
- if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page.
- {
- print '' . $langs->trans("AddAction") . '';
- }
+
// Edit
if ($object->statut == 1 && $user->rights->askpricesupplier->creer) {
print '';
@@ -2163,29 +1673,6 @@ if ($action == 'create')
}
}
- // Create contract
- if ($conf->contrat->enabled && $object->statut == 2) {
- $langs->load("contracts");
-
- if ($user->rights->contrat->creer) {
- print '';
- }
- }
-
- // Create an invoice and classify billed
- if ($object->statut == 2) {
- if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
- {
- print '';
- }
-
- $arrayofinvoiceforpropal = $object->getInvoiceArrayList();
- if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || ! empty($conf->global->WORKFLOW_PROPAL_CAN_CLASSIFIED_BILLED_WITHOUT_INVOICES))
- {
- print '';
- }
- }
-
// Close
if ($object->statut == 1 && $user->rights->askpricesupplier->cloturer) {
print '';
}
@@ -2301,11 +1784,9 @@ if ($action == 'create')
$formmail->withto = GETPOST("sendto") ? GETPOST("sendto") : $liste;
$formmail->withtocc = $liste;
$formmail->withtoccc = (! empty($conf->global->MAIN_EMAIL_USECCC) ? $conf->global->MAIN_EMAIL_USECCC : false);
- if (empty($object->ref_client)) {
- $formmail->withtopic = $outputlangs->trans('SendAskRef', '__ASKREF__');
- } else if (! empty($object->ref_client)) {
- $formmail->withtopic = $outputlangs->trans('SendAskRef', '__ASKREF__ (__REFCLIENT__)');
- }
+
+ $formmail->withtopic = $outputlangs->trans('SendAskRef', '__ASKREF__');
+
$formmail->withfile = 2;
$formmail->withbody = 1;
$formmail->withdeliveryreceipt = 1;
@@ -2314,30 +1795,10 @@ if ($action == 'create')
// Tableau des substitutions
$formmail->substit['__ASKREF__'] = $object->ref;
$formmail->substit['__SIGNATURE__'] = $user->signature;
- $formmail->substit['__REFCLIENT__'] = $object->ref_client;
$formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name;
$formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:'');
- $formmail->substit['__PERSONALIZED__'] = '';
$formmail->substit['__CONTACTCIVNAME__'] = '';
-
- // Find the good contact adress
- $custcontact = '';
- $contactarr = array();
- $contactarr = $object->liste_contact(- 1, 'external');
-
- if (is_array($contactarr) && count($contactarr) > 0) {
- foreach ($contactarr as $contact) {
- if ($contact ['libelle'] == $langs->trans('TypeContact_askpricesupplier_external_CUSTOMER')) { // TODO Use code and not label
- $contactstatic = new Contact($db);
- $contactstatic->fetch($contact ['id']);
- $custcontact = $contactstatic->getFullName($langs, 1);
- }
- }
-
- if (! empty($custcontact)) {
- $formmail->substit['__CONTACTCIVNAME__'] = $custcontact;
- }
- }
+ $formmail->substit['__PERSONALIZED__'] = '';
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
diff --git a/htdocs/comm/askpricesupplier/class/askpricesupplier.class.php b/htdocs/comm/askpricesupplier/class/askpricesupplier.class.php
index 1fbe004e734..4f1d1807953 100644
--- a/htdocs/comm/askpricesupplier/class/askpricesupplier.class.php
+++ b/htdocs/comm/askpricesupplier/class/askpricesupplier.class.php
@@ -58,18 +58,14 @@ class AskPriceSupplier extends CommonObject
var $socid; // Id client
var $client; // Objet societe client (a charger par fetch_client)
- var $contactid;
var $fk_project;
var $author;
var $ref;
- var $ref_client;
+ var $ref_fourn; //Reference saisie lors de l'ajout d'une ligne à la demande
var $statut; // 0 (draft), 1 (validated), 2 (signed), 3 (not signed), 4 (billed)
var $datec; // Date of creation
- var $datev; // Date of validation
var $date; // Date of proposal
- var $datep; // Same than date
var $date_livraison;
- var $fin_validite;
var $user_author_id;
var $user_valid_id;
@@ -95,15 +91,7 @@ class AskPriceSupplier extends CommonObject
var $note; // deprecated (for compatibility)
var $note_private;
var $note_public;
- var $fk_delivery_address; // deprecated (for compatibility)
- var $fk_address;
- var $address_type;
- var $address;
var $shipping_method_id;
- var $availability_id;
- var $availability_code;
- var $demand_reason_id;
- var $demand_reason_code;
var $products=array();
var $extraparams=array();
@@ -117,7 +105,6 @@ class AskPriceSupplier extends CommonObject
var $labelstatut=array();
var $labelstatut_short=array();
- // Pour board
var $nbtodo;
var $nbtodolate;
@@ -143,8 +130,6 @@ class AskPriceSupplier extends CommonObject
$this->remise_percent = 0;
$this->remise_absolue = 0;
- $this->duree_validite=$conf->global->ASKPRICESUPPLIER_VALIDITY_DURATION;
-
$langs->load("askpricesupplier");
$this->labelstatut[0]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_DRAFT_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_DRAFT_LABEL : $langs->trans("AskpricesupplierStatusDraft"));
$this->labelstatut[1]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_VALIDATED_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_VALIDATED_LABEL : $langs->trans("AskpricesupplierStatusValidated"));
@@ -240,27 +225,27 @@ class AskPriceSupplier extends CommonObject
return -5;
}
- $propalligne=new AskPriceSupplierLigne($this->db);
- $propalligne->fk_askpricesupplier=$this->id;
- $propalligne->fk_remise_except=$remise->id;
- $propalligne->desc=$remise->description; // Description ligne
- $propalligne->tva_tx=$remise->tva_tx;
- $propalligne->subprice=-$remise->amount_ht;
- $propalligne->fk_product=0; // Id produit predefini
- $propalligne->qty=1;
- $propalligne->remise=0;
- $propalligne->remise_percent=0;
- $propalligne->rang=-1;
- $propalligne->info_bits=2;
+ $askpricesupplierligne=new AskPriceSupplierLigne($this->db);
+ $askpricesupplierligne->fk_askpricesupplier=$this->id;
+ $askpricesupplierligne->fk_remise_except=$remise->id;
+ $askpricesupplierligne->desc=$remise->description; // Description ligne
+ $askpricesupplierligne->tva_tx=$remise->tva_tx;
+ $askpricesupplierligne->subprice=-$remise->amount_ht;
+ $askpricesupplierligne->fk_product=0; // Id produit predefini
+ $askpricesupplierligne->qty=1;
+ $askpricesupplierligne->remise=0;
+ $askpricesupplierligne->remise_percent=0;
+ $askpricesupplierligne->rang=-1;
+ $askpricesupplierligne->info_bits=2;
// TODO deprecated
- $propalligne->price=-$remise->amount_ht;
+ $askpricesupplierligne->price=-$remise->amount_ht;
- $propalligne->total_ht = -$remise->amount_ht;
- $propalligne->total_tva = -$remise->amount_tva;
- $propalligne->total_ttc = -$remise->amount_ttc;
+ $askpricesupplierligne->total_ht = -$remise->amount_ht;
+ $askpricesupplierligne->total_tva = -$remise->amount_tva;
+ $askpricesupplierligne->total_ttc = -$remise->amount_ttc;
- $result=$propalligne->insert();
+ $result=$askpricesupplierligne->insert();
if ($result > 0)
{
$result=$this->update_price(1);
@@ -277,7 +262,7 @@ class AskPriceSupplier extends CommonObject
}
else
{
- $this->error=$propalligne->error;
+ $this->error=$askpricesupplierligne->error;
$this->db->rollback();
return -2;
}
@@ -314,14 +299,12 @@ class AskPriceSupplier extends CommonObject
* @param int $fk_fournprice Id supplier price
* @param int $pa_ht Buying price without tax
* @param string $label ???
- * @param int $date_start Start date of the line
- * @param int $date_end End date of the line
* @param array $array_option extrafields array
* @return int >0 if OK, <0 if KO
*
* @see add_product
*/
- function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_option=0, $ref_fourn='')
+ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_fourn='')
{
global $mysoc;
@@ -417,9 +400,6 @@ class AskPriceSupplier extends CommonObject
$this->line->special_code=$special_code;
$this->line->fk_parent_line=$fk_parent_line;
- $this->line->date_start=$date_start;
- $this->line->date_end=$date_end;
-
$this->line->ref_fourn = $this->db->escape($ref_fourn);
// infos marge
@@ -495,12 +475,10 @@ class AskPriceSupplier extends CommonObject
* @param int $pa_ht Price (without tax) of product when it was bought
* @param string $label ???
* @param int $type 0/1=Product/service
- * @param int $date_start Start date of the line
- * @param int $date_end End date of the line
* @param array $array_option extrafields array
* @return int 0 if OK, <0 if KO
*/
- function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_option=0, $ref_fourn)
+ function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $array_option=0, $ref_fourn)
{
global $conf,$user,$langs, $mysoc;
@@ -594,9 +572,6 @@ class AskPriceSupplier extends CommonObject
}
$this->line->pa_ht = $pa_ht;
- $this->line->date_start=$date_start;
- $this->line->date_end=$date_end;
-
// TODO deprecated
$this->line->price=$price;
$this->line->remise=$remise;
@@ -682,12 +657,6 @@ class AskPriceSupplier extends CommonObject
$now=dol_now();
- // Clean parameters
- if (empty($this->date)) $this->date=$this->datep;
- $this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600);
- if (empty($this->availability_id)) $this->availability_id=0;
- if (empty($this->demand_reason_id)) $this->demand_reason_id=0;
-
dol_syslog(get_class($this)."::create");
// Check parameters
@@ -712,15 +681,6 @@ class AskPriceSupplier extends CommonObject
}
}
- /* PHFAVRE
- if (empty($this->date))
- {
- $this->error="Date of proposal is required";
- dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
- return -4;
- }
- */
-
$this->db->begin();
// Insert into database
@@ -732,22 +692,17 @@ class AskPriceSupplier extends CommonObject
$sql.= ", remise_absolue";
$sql.= ", tva";
$sql.= ", total";
- $sql.= ", datep";
$sql.= ", datec";
$sql.= ", ref";
$sql.= ", fk_user_author";
$sql.= ", note_private";
$sql.= ", note_public";
$sql.= ", model_pdf";
- $sql.= ", fin_validite";
$sql.= ", fk_cond_reglement";
$sql.= ", fk_mode_reglement";
$sql.= ", fk_account";
- $sql.= ", ref_client";
$sql.= ", date_livraison";
$sql.= ", fk_shipping_method";
- $sql.= ", fk_availability";
- $sql.= ", fk_input_reason";
$sql.= ", fk_projet";
$sql.= ", entity";
$sql.= ") ";
@@ -759,22 +714,17 @@ class AskPriceSupplier extends CommonObject
$sql.= ", ".($this->remise_absolue?$this->remise_absolue:'null');
$sql.= ", 0";
$sql.= ", 0";
- $sql.= ", '".$this->db->idate($this->date)."'";
$sql.= ", '".$this->db->idate($now)."'";
$sql.= ", '(PROV)'";
$sql.= ", ".($user->id > 0 ? "'".$user->id."'":"null");
$sql.= ", '".$this->db->escape($this->note_private)."'";
$sql.= ", '".$this->db->escape($this->note_public)."'";
$sql.= ", '".$this->modelpdf."'";
- $sql.= ", ".($this->fin_validite!=''?"'".$this->db->idate($this->fin_validite)."'":"null");
$sql.= ", ".$this->cond_reglement_id;
$sql.= ", ".$this->mode_reglement_id;
$sql.= ", ".($this->fk_account>0?$this->fk_account:'NULL');
- $sql.= ", '".$this->db->escape($this->ref_client)."'";
$sql.= ", ".($this->date_livraison!=''?"'".$this->db->idate($this->date_livraison)."'":"null");
$sql.= ", ".($this->shipping_method_id>0?$this->shipping_method_id:'NULL');
- $sql.= ", ".$this->availability_id;
- $sql.= ", ".$this->demand_reason_id;
$sql.= ", ".($this->fk_project?$this->fk_project:"null");
$sql.= ", ".$conf->entity;
$sql.= ")";
@@ -828,8 +778,6 @@ class AskPriceSupplier extends CommonObject
$this->lines[$i]->fk_fournprice,
$this->lines[$i]->pa_ht,
$this->lines[$i]->label,
- $this->lines[$i]->date_start,
- $this->lines[$i]->date_end,
$this->lines[$i]->array_options,
$this->lines[$i]->ref_fourn
);
@@ -855,17 +803,6 @@ class AskPriceSupplier extends CommonObject
if (! $ret) dol_print_error($this->db);
}
- // Set delivery address
- if (! $error && $this->fk_delivery_address)
- {
- $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier";
- $sql.= " SET fk_delivery_address = ".$this->fk_delivery_address;
- $sql.= " WHERE ref = '".$this->ref."'";
- $sql.= " AND entity = ".$conf->entity;
-
- $result=$this->db->query($sql);
- }
-
if (! $error)
{
// Mise a jour infos denormalisees
@@ -935,7 +872,7 @@ class AskPriceSupplier extends CommonObject
/**
- * Insert into DB a proposal object completely defined by its data members (ex, results from copy).
+ * Insert into DB a askpricesupplier object completely defined by its data members (ex, results from copy).
*
* @param User $user User that create
* @return int Id of the new object if ok, <0 if ko
@@ -981,12 +918,8 @@ class AskPriceSupplier extends CommonObject
$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
$this->fk_project = '';
- $this->fk_delivery_address = '';
}
- // reset ref_client
- $this->ref_client = '';
-
// TODO Change product price if multi-prices
}
else
@@ -1007,34 +940,16 @@ class AskPriceSupplier extends CommonObject
$this->user_author = $user->id;
$this->user_valid = '';
$this->date = $now;
- $this->datep = $now; // deprecated
- $this->fin_validite = $this->date + ($this->duree_validite * 24 * 3600);
- if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $this->ref_client = '';
// Set ref
require_once DOL_DOCUMENT_ROOT ."/core/modules/askpricesupplier/".$conf->global->ASKPRICESUPPLIER_ADDON.'.php';
$obj = $conf->global->ASKPRICESUPPLIER_ADDON;
$modAskPriceSupplier = new $obj;
$this->ref = $modAskPriceSupplier->getNextValue($objsoc,$this);
-
+
// Create clone
$result=$this->create($user);
if ($result < 0) $error++;
- /* PHFAVRE retrait en temporaire
- else
- {
- // copy internal contacts
- if ($this->copy_linked_contact($objFrom, 'internal') < 0)
- $error++;
-
- // copy external contacts if same company
- elseif ($objFrom->socid == $this->socid)
- {
- if ($this->copy_linked_contact($objFrom, 'external') < 0)
- $error++;
- }
- }
- */
if (! $error)
{
@@ -1081,30 +996,21 @@ class AskPriceSupplier extends CommonObject
$sql.= ", p.total, p.tva, p.localtax1, p.localtax2, p.total_ht";
$sql.= ", p.datec";
$sql.= ", p.date_valid as datev";
- $sql.= ", p.datep as dp";
- $sql.= ", p.fin_validite as dfv";
$sql.= ", p.date_livraison as date_livraison";
- $sql.= ", p.model_pdf, p.ref_client, p.extraparams";
+ $sql.= ", p.model_pdf, p.extraparams";
$sql.= ", p.note_private, p.note_public";
$sql.= ", p.fk_projet, p.fk_statut";
$sql.= ", p.fk_user_author, p.fk_user_valid, p.fk_user_cloture";
- $sql.= ", p.fk_delivery_address";
- $sql.= ", p.fk_availability";
- $sql.= ", p.fk_input_reason";
$sql.= ", p.fk_cond_reglement";
$sql.= ", p.fk_mode_reglement";
$sql.= ', p.fk_account';
$sql.= ", p.fk_shipping_method";
$sql.= ", c.label as statut_label";
- $sql.= ", ca.code as availability_code, ca.label as availability";
- $sql.= ", dr.code as demand_reason_code, dr.label as demand_reason";
$sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc";
$sql.= ", cp.code as mode_reglement_code, cp.libelle as mode_reglement";
$sql.= " FROM ".MAIN_DB_PREFIX."c_propalst as c, ".MAIN_DB_PREFIX."askpricesupplier as p";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as cp ON p.fk_mode_reglement = cp.id';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON p.fk_cond_reglement = cr.rowid';
- $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_availability as ca ON p.fk_availability = ca.rowid';
- $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_input_reason as dr ON p.fk_input_reason = dr.rowid';
$sql.= " WHERE p.fk_statut = c.id";
$sql.= " AND p.entity = ".$conf->entity;
if ($ref) $sql.= " AND p.ref='".$ref."'";
@@ -1121,7 +1027,6 @@ class AskPriceSupplier extends CommonObject
$this->id = $obj->rowid;
$this->ref = $obj->ref;
- $this->ref_client = $obj->ref_client;
$this->remise = $obj->remise;
$this->remise_percent = $obj->remise_percent;
$this->remise_absolue = $obj->remise_absolue;
@@ -1144,18 +1049,8 @@ class AskPriceSupplier extends CommonObject
$this->datev = $this->db->jdate($obj->datev); // TODO obsolete
$this->date_creation = $this->db->jdate($obj->datec); //Creation date
$this->date_validation = $this->db->jdate($obj->datev); //Validation date
- $this->date = $this->db->jdate($obj->dp); // Proposal date
- $this->datep = $this->db->jdate($obj->dp); // deprecated
- $this->fin_validite = $this->db->jdate($obj->dfv);
$this->date_livraison = $this->db->jdate($obj->date_livraison);
$this->shipping_method_id = ($obj->fk_shipping_method>0)?$obj->fk_shipping_method:null;
- $this->availability_id = $obj->fk_availability;
- $this->availability_code = $obj->availability_code;
- $this->availability = $obj->availability;
- $this->demand_reason_id = $obj->fk_input_reason;
- $this->demand_reason_code = $obj->demand_reason_code;
- $this->demand_reason = $obj->demand_reason;
- $this->fk_address = $obj->fk_delivery_address;
$this->mode_reglement_id = $obj->fk_mode_reglement;
$this->mode_reglement_code = $obj->mode_reglement_code;
@@ -1189,12 +1084,12 @@ class AskPriceSupplier extends CommonObject
$this->lines = array();
/*
- * Lignes propales liees a un produit ou non
+ * Lignes askprice liees a un produit ou non
*/
$sql = "SELECT d.rowid, d.fk_askpricesupplier, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,";
$sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,";
$sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label,';
- $sql.= ' d.date_start, d.date_end, d.ref_fourn as ref_produit_fourn';
+ $sql.= ' d.ref_fourn as ref_produit_fourn';
$sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplierdet as d";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
$sql.= " WHERE d.fk_askpricesupplier = ".$this->id;
@@ -1249,15 +1144,11 @@ class AskPriceSupplier extends CommonObject
$line->product_label = $objp->product_label;
$line->product_desc = $objp->product_desc; // Description produit
$line->fk_product_type = $objp->fk_product_type;
-
- $line->date_start = $objp->date_start;
- $line->date_end = $objp->date_end;
$line->ref_fourn = $objp->ref_produit_fourn;
$this->lines[$i] = $line;
- //dol_syslog("1 ".$line->fk_product);
- //print "xx $i ".$this->lines[$i]->fk_product;
+
$i++;
}
$this->db->free($result);
@@ -1268,7 +1159,7 @@ class AskPriceSupplier extends CommonObject
return -1;
}
- // Retreive all extrafield for propal
+ // Retreive all extrafield for askprice
// fetch optionals attributes and labels
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields=new ExtraFields($this->db);
@@ -1436,69 +1327,6 @@ class AskPriceSupplier extends CommonObject
}
}
-
- /**
- * Define proposal date
- *
- * @param User $user Object user that modify
- * @param int $date Date
- * @return int <0 if KO, >0 if OK
- */
- function set_date($user, $date)
- {
- if (empty($date))
- {
- $this->error='ErrorBadParameter';
- dol_syslog(get_class($this)."::set_date ".$this->error, LOG_ERR);
- return -1;
- }
-
- if (! empty($user->rights->askpricesupplier->creer))
- {
- $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier SET datep = '".$this->db->idate($date)."'";
- $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
-
- dol_syslog(get_class($this)."::set_date", LOG_DEBUG);
- if ($this->db->query($sql) )
- {
- $this->date = $date;
- $this->datep = $date; // deprecated
- return 1;
- }
- else
- {
- $this->error=$this->db->lasterror();
- return -1;
- }
- }
- }
-
- /**
- * Define end validity date
- *
- * @param User $user Object user that modify
- * @param int $date_fin_validite End of validity date
- * @return int <0 if KO, >0 if OK
- */
- function set_echeance($user, $date_fin_validite)
- {
- if (! empty($user->rights->propal->creer))
- {
- $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier SET fin_validite = ".($date_fin_validite!=''?"'".$this->db->idate($date_fin_validite)."'":'null');
- $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
- if ($this->db->query($sql) )
- {
- $this->fin_validite = $date_fin_validite;
- return 1;
- }
- else
- {
- $this->error=$this->db->error();
- return -1;
- }
- }
- }
-
/**
* Set delivery date
*
@@ -1528,97 +1356,6 @@ class AskPriceSupplier extends CommonObject
}
}
- /**
- * Set delivery
- *
- * @param User $user Object user that modify
- * @param int $id Availability id
- * @return int <0 if KO, >0 if OK
- */
- function set_availability($user, $id)
- {
- if (! empty($user->rights->propal->creer))
- {
- $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier ";
- $sql.= " SET fk_availability = '".$id."'";
- $sql.= " WHERE rowid = ".$this->id;
-
- if ($this->db->query($sql))
- {
- $this->fk_availability = $id;
- return 1;
- }
- else
- {
- $this->error=$this->db->error();
- dol_syslog(get_class($this)."::set_availability Erreur SQL");
- return -1;
- }
- }
- }
-
- /**
- * Set source of demand
- *
- * @param User $user Object user that modify
- * @param int $id Input reason id
- * @return int <0 if KO, >0 if OK
- */
- function set_demand_reason($user, $id)
- {
- if (! empty($user->rights->propal->creer))
- {
- $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier ";
- $sql.= " SET fk_input_reason = '".$id."'";
- $sql.= " WHERE rowid = ".$this->id;
-
- if ($this->db->query($sql))
- {
- $this->fk_input_reason = $id;
- return 1;
- }
- else
- {
- $this->error=$this->db->error();
- dol_syslog(get_class($this)."::set_demand_reason Erreur SQL");
- return -1;
- }
- }
- }
-
- /**
- * Set customer reference number
- *
- * @param User $user Object user that modify
- * @param string $ref_client Customer reference
- * @return int <0 if ko, >0 if ok
- */
- function set_ref_client($user, $ref_client)
- {
- if (! empty($user->rights->askpricesupplier->creer))
- {
- dol_syslog('AskPriceSupplier::set_ref_client this->id='.$this->id.', ref_client='.$ref_client);
-
- $sql = 'UPDATE '.MAIN_DB_PREFIX.'askpricesupplier SET ref_client = '.(empty($ref_client) ? 'NULL' : '\''.$this->db->escape($ref_client).'\'');
- $sql.= ' WHERE rowid = '.$this->id;
- if ($this->db->query($sql) )
- {
- $this->ref_client = $ref_client;
- return 1;
- }
- else
- {
- $this->error=$this->db->error();
- dol_syslog('AskPriceSupplier::set_ref_client Erreur '.$this->error.' - '.$sql);
- return -2;
- }
- }
- else
- {
- return -1;
- }
- }
-
/**
* Set an overall discount on the proposal
*
@@ -1842,10 +1579,9 @@ class AskPriceSupplier extends CommonObject
}
/**
- * Choose between upate or create ProductFournisseur
+ * Choose between update or create ProductFournisseur
*
* @param User $user Object user
- * @return int <0 if KO, >0 if OK
*/
function updateOrCreatePriceFournisseur($user)
{
@@ -1925,37 +1661,6 @@ class AskPriceSupplier extends CommonObject
return -1;
}
}
-
- /**
- * Class invoiced the Propal
- *
- * @return int <0 si ko, >0 si ok
- */
- function classifyBilled()
- {
- $sql = 'UPDATE '.MAIN_DB_PREFIX.'askpricesupplier SET fk_statut = 4';
- $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > 0 ;';
- if ($this->db->query($sql) )
- {
- $this->statut=4;
- return 1;
- }
- else
- {
- dol_print_error($this->db);
- }
- }
-
- /**
- * Class invoiced the Propal
- *
- * @return int <0 si ko, >0 si ok
- * @deprecated
- */
- function classer_facturee()
- {
- return $this->classifyBilled();
- }
/**
* Set draft status
@@ -1984,7 +1689,7 @@ class AskPriceSupplier extends CommonObject
/**
- * Return list of proposal (eventually filtered on user) into an array
+ * Return list of askprice (eventually filtered on user) into an array
*
* @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
* @param int $draft 0=not draft, 1=draft
@@ -1996,14 +1701,14 @@ class AskPriceSupplier extends CommonObject
* @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK
*/
- function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC')
+ function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datec', $sortorder='DESC')
{
global $conf,$user;
$ga = array();
$sql = "SELECT s.rowid, s.nom as name, s.client,";
- $sql.= " p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, ";
+ $sql.= " p.rowid as askpricesupplierid, p.fk_statut, p.total_ht, p.ref, p.remise, ";
$sql.= " p.datep as dp, p.fin_validite as datelimite";
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."askpricesupplier as p, ".MAIN_DB_PREFIX."c_propalst as c";
@@ -2057,105 +1762,10 @@ class AskPriceSupplier extends CommonObject
dol_print_error($this->db);
return -1;
}
- }
+ }
/**
- * Returns an array with the numbers of related invoices
- *
- * @return array Array of invoices
- */
- function getInvoiceArrayList()
- {
- return $this->InvoiceArrayList($this->id);
- }
-
- /**
- * Returns an array with id and ref of related invoices
- *
- * @param int $id Id propal
- * @return array Array of invoices id
- */
- function InvoiceArrayList($id)
- {
- $ga = array();
- $linkedInvoices = array();
-
- $this->fetchObjectLinked($id,$this->element);
- foreach($this->linkedObjectsIds as $objecttype => $objectid)
- {
- $numi=count($objectid);
- for ($i=0;$i<$numi;$i++)
- {
- // Cas des factures liees directement
- if ($objecttype == 'facture')
- {
- $linkedInvoices[] = $objectid[$i];
- }
- // Cas des factures liees par un autre objet (ex: commande)
- else
- {
- $this->fetchObjectLinked($objectid[$i],$objecttype);
- foreach($this->linkedObjectsIds as $subobjecttype => $subobjectid)
- {
- $numj=count($subobjectid);
- for ($j=0;$j<$numj;$j++)
- {
- if ($subobjecttype == 'facture')
- {
- $linkedInvoices[] = $subobjectid[$j];
- }
- }
- }
- }
- }
- }
-
- if (count($linkedInvoices) > 0)
- {
- $sql= "SELECT rowid as facid, facnumber, total, datef as df, fk_user_author, fk_statut, paye";
- $sql.= " FROM ".MAIN_DB_PREFIX."facture";
- $sql.= " WHERE rowid IN (".implode(',',$linkedInvoices).")";
-
- dol_syslog(get_class($this)."::InvoiceArrayList", LOG_DEBUG);
- $resql=$this->db->query($sql);
-
- if ($resql)
- {
- $tab_sqlobj=array();
- $nump = $this->db->num_rows($resql);
- for ($i = 0;$i < $nump;$i++)
- {
- $sqlobj = $this->db->fetch_object($resql);
- $tab_sqlobj[] = $sqlobj;
- }
- $this->db->free($resql);
-
- $nump = count($tab_sqlobj);
-
- if ($nump)
- {
- $i = 0;
- while ($i < $nump)
- {
- $obj = array_shift($tab_sqlobj);
-
- $ga[$i] = $obj;
-
- $i++;
- }
- }
- return $ga;
- }
- else
- {
- return -1;
- }
- }
- else return $ga;
- }
-
- /**
- * Delete proposal
+ * Delete askprice
*
* @param User $user Object user that delete
* @param int $notrigger 1=Does not execute triggers, 0= execuete triggers
@@ -2189,12 +1799,6 @@ class AskPriceSupplier extends CommonObject
// Delete linked object
$res = $this->deleteObjectLinked();
if ($res < 0) $error++;
-
- // Delete linked contacts
- /* PHFAVRE retrait en temporaire
- $res = $this->delete_linked_contact();
- if ($res < 0) $error++;
- */
if (! $error)
{
@@ -2280,76 +1884,7 @@ class AskPriceSupplier extends CommonObject
}
/**
- * Change the delivery time
- *
- * @param int $availability_id Id of new delivery time
- * @return int >0 if OK, <0 if KO
- */
- function availability($availability_id)
- {
- dol_syslog('AskPriceSupplier::availability('.$availability_id.')');
- if ($this->statut >= 0)
- {
- $sql = 'UPDATE '.MAIN_DB_PREFIX.'askpricesupplier';
- $sql .= ' SET fk_availability = '.$availability_id;
- $sql .= ' WHERE rowid='.$this->id;
- if ( $this->db->query($sql) )
- {
- $this->availability_id = $availability_id;
- return 1;
- }
- else
- {
- dol_syslog('AskPriceSupplier::availability Erreur '.$sql.' - '.$this->db->error());
- $this->error=$this->db->error();
- return -1;
- }
- }
- else
- {
- dol_syslog('AskPriceSupplier::availability, etat propale incompatible');
- $this->error='Etat propale incompatible '.$this->statut;
- return -2;
- }
- }
-
- /**
- * Change source demand
- *
- * @param int $demand_reason_id Id of new source demand
- * @return int >0 si ok, <0 si ko
- */
- function demand_reason($demand_reason_id)
- {
- dol_syslog('AskPriceSupplier::demand_reason('.$demand_reason_id.')');
- if ($this->statut >= 0)
- {
- $sql = 'UPDATE '.MAIN_DB_PREFIX.'askpricesupplier';
- $sql .= ' SET fk_input_reason = '.$demand_reason_id;
- $sql .= ' WHERE rowid='.$this->id;
- if ( $this->db->query($sql) )
- {
- $this->demand_reason_id = $demand_reason_id;
- return 1;
- }
- else
- {
- dol_syslog('AskPriceSupplier::demand_reason Erreur '.$sql.' - '.$this->db->error());
- $this->error=$this->db->error();
- return -1;
- }
- }
- else
- {
- dol_syslog('AskPriceSupplier::demand_reason, etat propale incompatible');
- $this->error='Etat propale incompatible '.$this->statut;
- return -2;
- }
- }
-
-
- /**
- * Object Proposal Information
+ * Object AskPriceSupplier Information
*
* @param int $id Proposal id
* @return void
@@ -2424,23 +1959,23 @@ class AskPriceSupplier extends CommonObject
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* @return string Label
*/
- function LibStatut($statut,$mode=1)
+ function LibStatut($statut,$mode=1)
{
- global $langs;
- $langs->load("askpricesupplier");
-
- if ($statut==0) $statuttrans='statut0';
- if ($statut==1) $statuttrans='statut1';
- if ($statut==2) $statuttrans='statut3';
- if ($statut==3) $statuttrans='statut5';
- if ($statut==4) $statuttrans='statut6';
-
- if ($mode == 0) return $this->labelstatut[$statut];
- if ($mode == 1) return $this->labelstatut_short[$statut];
- if ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut];
- if ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans);
- if ($mode == 4) return img_picto($this->labelstatut[$statut],$statuttrans).' '.$this->labelstatut[$statut];
- if ($mode == 5) return ''.$this->labelstatut_short[$statut].' '.img_picto($this->labelstatut_short[$statut],$statuttrans);
+ global $langs;
+ $langs->load("askpricesupplier");
+
+ if ($statut==0) $statuttrans='statut0';
+ if ($statut==1) $statuttrans='statut1';
+ if ($statut==2) $statuttrans='statut3';
+ if ($statut==3) $statuttrans='statut5';
+ if ($statut==4) $statuttrans='statut6';
+
+ if ($mode == 0) return $this->labelstatut[$statut];
+ if ($mode == 1) return $this->labelstatut_short[$statut];
+ if ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut];
+ if ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans);
+ if ($mode == 4) return img_picto($this->labelstatut[$statut],$statuttrans).' '.$this->labelstatut[$statut];
+ if ($mode == 5) return ''.$this->labelstatut_short[$statut].' '.img_picto($this->labelstatut_short[$statut],$statuttrans);
}
@@ -2448,7 +1983,7 @@ class AskPriceSupplier extends CommonObject
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
*
* @param User $user Object user
- * @param int $mode "opened" for proposal to close, "signed" for proposal to invoice
+ * @param int $mode "opened" for askprice to close, "signed" for proposal to invoice
* @return int <0 if KO, >0 if OK
*/
function load_board($user,$mode)
@@ -2460,7 +1995,7 @@ class AskPriceSupplier extends CommonObject
$this->nbtodo=$this->nbtodolate=0;
$clause = " WHERE";
- $sql = "SELECT p.rowid, p.ref, p.datec as datec, p.fin_validite as datefin";
+ $sql = "SELECT p.rowid, p.ref, p.datec as datec";
$sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplier as p";
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
@@ -2536,19 +2071,13 @@ class AskPriceSupplier extends CommonObject
// Initialise parametres
$this->id=0;
$this->ref = 'SPECIMEN';
- $this->ref_client='NEMICEPS';
$this->specimen=1;
$this->socid = 1;
$this->date = time();
- $this->fin_validite = $this->date+3600*24*30;
$this->cond_reglement_id = 1;
$this->cond_reglement_code = 'RECEP';
$this->mode_reglement_id = 7;
$this->mode_reglement_code = 'CHQ';
- $this->availability_id = 1;
- $this->availability_code = 'AV_NOW';
- $this->demand_reason_id = 1;
- $this->demand_reason_code = 'SRC_00';
$this->note_public='This is a comment (public)';
$this->note_private='This is a comment (private)';
// Lines
@@ -2621,7 +2150,7 @@ class AskPriceSupplier extends CommonObject
// This assignment in condition is not a bug. It allows walking the results.
while ($obj=$this->db->fetch_object($resql))
{
- $this->nb["proposals"]=$obj->nb;
+ $this->nb["askprice"]=$obj->nb;
}
$this->db->free($resql);
return 1;
@@ -2637,7 +2166,7 @@ class AskPriceSupplier extends CommonObject
/**
* Returns the reference to the following non used Proposal used depending on the active numbering module
- * defined into PROPALE_ADDON
+ * defined into ASKPRICESUPPLIER_ADDON
*
* @param Societe $soc Object thirdparty
* @return string Reference libre pour la propale
@@ -2681,7 +2210,6 @@ class AskPriceSupplier extends CommonObject
else
{
$this->error=$obj->error;
- //dol_print_error($db,"Propale::getNextNumRef ".$obj->error);
return "";
}
}
@@ -2707,18 +2235,10 @@ class AskPriceSupplier extends CommonObject
$result='';
$label=$langs->trans("ShowAskpricesupplier").': '.$this->ref;
- if (! empty($this->ref_client))
- $label.= ' '.$langs->trans('RefCustomer').': '.$this->ref_client;
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
if ($option == '') {
$lien = 'id. $get_params .$linkclose;
- }
- if ($option == 'expedition') {
- $lien = 'id. $get_params .$linkclose;
}
@@ -2736,7 +2256,7 @@ class AskPriceSupplier extends CommonObject
}
/**
- * Retrieve an array of propal lines
+ * Retrieve an array of askprice lines
*
* @return int <0 if ko, >0 if ok
*/
@@ -2745,7 +2265,7 @@ class AskPriceSupplier extends CommonObject
$sql = 'SELECT pt.rowid, pt.label as custom_label, pt.description, pt.fk_product, pt.fk_remise_except,';
$sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,';
$sql.= ' pt.total_ht, pt.total_tva, pt.total_ttc, pt.fk_product_fournisseur_price as fk_fournprice, pt.buy_price_ht as pa_ht, pt.special_code, pt.localtax1_tx, pt.localtax2_tx,';
- $sql.= ' pt.date_start, pt.date_end, pt.product_type, pt.rang, pt.fk_parent_line,';
+ $sql.= ' pt.product_type, pt.rang, pt.fk_parent_line,';
$sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,';
$sql.= ' p.description as product_desc, pt.ref_fourn as ref_produit_fourn';
$sql.= ' FROM '.MAIN_DB_PREFIX.'askpricesupplierdet as pt';
@@ -2792,8 +2312,6 @@ class AskPriceSupplier extends CommonObject
$this->lines[$i]->fk_parent_line = $obj->fk_parent_line;
$this->lines[$i]->special_code = $obj->special_code;
$this->lines[$i]->rang = $obj->rang;
- $this->lines[$i]->date_start = $this->db->jdate($obj->date_start);
- $this->lines[$i]->date_end = $this->db->jdate($obj->date_end);
$this->lines[$i]->ref_fourn = $obj->ref_produit_fourn;
@@ -2835,7 +2353,7 @@ class AskPriceSupplier extends CommonObject
}
else
{
- $modele = 'azur';
+ $modele = 'aurore';
}
}
@@ -2850,7 +2368,7 @@ class AskPriceSupplier extends CommonObject
/**
* \class AskPriceSupplierLigne
- * \brief Class to manage price ask supplier lines
+ * \brief Class to manage askpricesupplier lines
*/
class AskPriceSupplierLigne extends CommonObject
{
@@ -2862,7 +2380,7 @@ class AskPriceSupplierLigne extends CommonObject
var $oldline;
- // From llx_propaldet
+ // From llx_askpricesupplierdet
var $rowid;
var $fk_askpricesupplier;
var $fk_parent_line;
@@ -2912,9 +2430,6 @@ class AskPriceSupplierLigne extends CommonObject
var $total_localtax1; // Line total local tax 1
var $total_localtax2; // Line total local tax 2
- var $date_start;
- var $date_end;
-
var $skip_update_total; // Skip update price total for special lines
var $ref_fourn;
@@ -2942,7 +2457,7 @@ class AskPriceSupplierLigne extends CommonObject
$sql.= ' pd.info_bits, pd.total_ht, pd.total_tva, pd.total_ttc, pd.fk_product_fournisseur_price as fk_fournprice, pd.buy_price_ht as pa_ht, pd.special_code, pd.rang,';
$sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,';
$sql.= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,';
- $sql.= ' pd.date_start, pd.date_end, pd.product_type, pd.ref_fourn as ref_produit_fourn';
+ $sql.= ' pd.product_type, pd.ref_fourn as ref_produit_fourn';
$sql.= ' FROM '.MAIN_DB_PREFIX.'askpricesupplierdet as pd';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid';
$sql.= ' WHERE pd.rowid = '.$rowid;
@@ -2987,9 +2502,6 @@ class AskPriceSupplierLigne extends CommonObject
$this->libelle = $objp->product_label; // deprecated
$this->product_label = $objp->product_label;
$this->product_desc = $objp->product_desc;
-
- $this->date_start = $this->db->jdate($objp->date_start);
- $this->date_end = $this->db->jdate($objp->date_end);
$this->ref_fourn = $objp->ref_produit_forun;
@@ -3051,7 +2563,7 @@ class AskPriceSupplierLigne extends CommonObject
$sql.= ' subprice, remise_percent, ';
$sql.= ' info_bits, ';
$sql.= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_product_fournisseur_price, buy_price_ht, special_code, rang,';
- $sql.= ' date_start, date_end, ref_fourn)';
+ $sql.= ' ref_fourn)';
$sql.= " VALUES (".$this->fk_askpricesupplier.",";
$sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").",";
$sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").",";
@@ -3077,8 +2589,6 @@ class AskPriceSupplierLigne extends CommonObject
$sql.= " ".(isset($this->pa_ht)?"'".price2num($this->pa_ht)."'":"null").",";
$sql.= ' '.$this->special_code.',';
$sql.= ' '.$this->rang.',';
- $sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").',';
- $sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").',';
$sql.= " '".$this->db->escape($this->ref_fourn)."'";
$sql.= ')';
@@ -3240,8 +2750,6 @@ class AskPriceSupplierLigne extends CommonObject
if (strlen($this->special_code)) $sql.= " , special_code=".$this->special_code;
$sql.= " , fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null");
if (! empty($this->rang)) $sql.= ", rang=".$this->rang;
- $sql.= " , date_start=".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null");
- $sql.= " , date_end=".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null");
$sql.= " , ref_fourn=".(! empty($this->ref_fourn)?"'".$this->db->escape($this->ref_fourn)."'":"null");
$sql.= " WHERE rowid = ".$this->rowid;
diff --git a/htdocs/comm/askpricesupplier/sql/llx_askpricesupplier.sql b/htdocs/comm/askpricesupplier/sql/llx_askpricesupplier.sql
index 93389cd5770..a7d1e2ccecc 100644
--- a/htdocs/comm/askpricesupplier/sql/llx_askpricesupplier.sql
+++ b/htdocs/comm/askpricesupplier/sql/llx_askpricesupplier.sql
@@ -4,13 +4,10 @@ CREATE TABLE `llx_askpricesupplier` (
`entity` int(11) NOT NULL DEFAULT '1',
`ref_ext` varchar(255) DEFAULT NULL,
`ref_int` varchar(255) DEFAULT NULL,
- `ref_client` varchar(255) DEFAULT NULL,
`fk_soc` int(11) DEFAULT NULL,
`fk_projet` int(11) DEFAULT NULL,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`datec` datetime DEFAULT NULL,
- `datep` date DEFAULT NULL,
- `fin_validite` datetime DEFAULT NULL,
`date_valid` datetime DEFAULT NULL,
`date_cloture` datetime DEFAULT NULL,
`fk_user_author` int(11) DEFAULT NULL,
@@ -36,11 +33,8 @@ CREATE TABLE `llx_askpricesupplier` (
`model_pdf` varchar(255) DEFAULT NULL,
`date_livraison` date DEFAULT NULL,
`fk_shipping_method` int(11) DEFAULT NULL,
- `fk_availability` int(11) DEFAULT NULL,
- `fk_input_reason` int(11) DEFAULT NULL,
`import_key` varchar(14) DEFAULT NULL,
`extraparams` varchar(255) DEFAULT NULL,
- `fk_delivery_address` int(11) DEFAULT NULL,
PRIMARY KEY (`rowid`),
UNIQUE KEY `uk_askpricesupplier_ref` (`ref`,`entity`),
KEY `idx_askpricesupplier_fk_soc` (`fk_soc`),
diff --git a/htdocs/comm/askpricesupplier/sql/llx_askpricesupplierdet.sql b/htdocs/comm/askpricesupplier/sql/llx_askpricesupplierdet.sql
index 1fa44fae708..919b89fe863 100644
--- a/htdocs/comm/askpricesupplier/sql/llx_askpricesupplierdet.sql
+++ b/htdocs/comm/askpricesupplier/sql/llx_askpricesupplierdet.sql
@@ -22,8 +22,6 @@ CREATE TABLE `llx_askpricesupplierdet` (
`total_localtax2` double(24,8) DEFAULT '0.00000000',
`total_ttc` double(24,8) DEFAULT '0.00000000',
`product_type` int(11) DEFAULT '0',
- `date_start` datetime DEFAULT NULL,
- `date_end` datetime DEFAULT NULL,
`info_bits` int(11) DEFAULT '0',
`buy_price_ht` double(24,8) DEFAULT '0.00000000',
`fk_product_fournisseur_price` int(11) DEFAULT NULL,
diff --git a/htdocs/comm/askpricesupplier/tpl/linkedobjectblock.tpl.php b/htdocs/comm/askpricesupplier/tpl/linkedobjectblock.tpl.php
index f0d38f0ae4a..d37d2d49351 100644
--- a/htdocs/comm/askpricesupplier/tpl/linkedobjectblock.tpl.php
+++ b/htdocs/comm/askpricesupplier/tpl/linkedobjectblock.tpl.php
@@ -17,11 +17,6 @@
* along with this program. If not, see .
*/
-/**
- * \file htdocs/comm/propal/tpl/linkedobjectblock.tpl.php
- * \ingroup propal
- * \brief Template to show objects linked to proposals
- */
?>
diff --git a/htdocs/core/modules/modAskPriceSupplier.class.php b/htdocs/core/modules/modAskPriceSupplier.class.php
index 1db1ca9c6c3..289a6879578 100644
--- a/htdocs/core/modules/modAskPriceSupplier.class.php
+++ b/htdocs/core/modules/modAskPriceSupplier.class.php
@@ -21,11 +21,11 @@
*/
/**
- * \defgroup propale Module commercial proposals
- * \brief Module pour gerer la tenue de propositions commerciales
- * \file htdocs/core/modules/modPropale.class.php
- * \ingroup propale
- * \brief Fichier de description et activation du module Propale
+ * \defgroup askpricesupplier Module de demandes de prix fournisseurs
+ * \brief Module pour gerer la tenue des demandes fournisseurs
+ * \file htdocs/core/modules/modAskPriceSupplier.class.php
+ * \ingroup askpricesupplier
+ * \brief Fichier de description et activation du module AskPriceSupplier
*/
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
@@ -49,22 +49,19 @@ class modAskPriceSupplier extends DolibarrModules
$this->numero = 999999;
$this->family = "products";
- // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "askpricesupplierDESC";
- // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
$this->picto='askpricesupplier';
- // Data directories to create when module is enabled
$this->dirs = array();
// Dependancies
- $this->depends = array('modFournisseur');
+ $this->depends = array('modFournisseur', 'modPropale');
$this->requiredby = array();
$this->config_page_url = array("askpricesupplier.php");
$this->langfiles = array("askpricesupplier");
@@ -87,13 +84,6 @@ class modAskPriceSupplier extends DolibarrModules
$this->const[$r][4] = 0;
$r++;
- $this->const[$r][0] = "ASKPRICESUPPLIER_VALIDITY_DURATION";
- $this->const[$r][1] = "chaine";
- $this->const[$r][2] = "15";
- $this->const[$r][3] = 'Durée de validitée des demandes de prix fournisseurs';
- $this->const[$r][4] = 0;
- $r++;
-
$this->const[$r][0] = "ASKPRICESUPPLIER_ADDON_PDF_ODT_PATH";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/askpricesupplier";
@@ -146,33 +136,6 @@ class modAskPriceSupplier extends DolibarrModules
$this->rights[$r][1] = 'Cloturer les demandes de prix fournisseurs'; // libelle de la permission
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
$this->rights[$r][4] = 'cloturer';
-
- // Exports
- //--------
- $r=0;
-/*
- $r++;
- $this->export_code[$r]=$this->rights_class.'_'.$r;
- $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
- $this->export_permission[$r]=array(array("propale","export"));
- $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','co.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note_public'=>"Note",'c.date_livraison'=>'DeliveryDate','c.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','c.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
- //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
- $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','co.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note_public'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text');
- $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','co.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note_public'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product');
- $this->export_dependencies_array[$r]=array('propal_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
-
- $this->export_sql_start[$r]='SELECT DISTINCT ';
- $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s ';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,';
- $this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'propal as c';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uc ON c.fk_user_author = uc.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as uv ON c.fk_user_valid = uc.rowid';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'propal_extrafields as extra ON c.rowid = extra.fk_object';
- $this->export_sql_end[$r] .=', '.MAIN_DB_PREFIX.'propaldet as cd';
- $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)';
- $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal';
- $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity;
- */
// Main menu entries
$this->menu = array(); // List of menus to add
@@ -273,14 +236,4 @@ class modAskPriceSupplier extends DolibarrModules
return $this->_remove($sql,$options);
}
-}
-
-
-/*
- *
-DROP TABLE llx_askpricesupplier_extrafields;
-DROP TABLE llx_askpricesupplierdet_extrafields;
-DROP TABLE llx_askpricesupplierdet;
-DROP TABLE llx_askpricesupplier;
- *
- */
+}
\ No newline at end of file
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index bca163db8bd..9e801108ada 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1150,6 +1150,13 @@ UseOptionLineIfNoQuantity=A line of product/service with a zero amount is consid
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
+##### AskPriceSupplier #####
+AskPriceSupplierSetup=Price requests suppliers module setup
+AskPriceSupplierNumberingModules=Price requests suppliers numbering models
+AskPriceSupplierPDFModules=Price requests suppliers documents models
+FreeLegalTextOnAskPriceSupplier=Free text on price requests suppliers
+WatermarkOnDraftAskPriceSupplier=Watermark on draft price requests suppliers (none if empty)
+BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER=Ask for bank account destination of price request
##### Orders #####
OrdersSetup=Order management setup
OrdersNumberingModules=Orders numbering models
diff --git a/htdocs/langs/en_US/askpricesupplier.lang b/htdocs/langs/en_US/askpricesupplier.lang
new file mode 100644
index 00000000000..80f0fe25285
--- /dev/null
+++ b/htdocs/langs/en_US/askpricesupplier.lang
@@ -0,0 +1,56 @@
+# Dolibarr language file - Source file is en_US - askpricesupplier
+AskPriceSupplier=Price requests suppliers
+askpricesupplierDESC=Managing price requests suppliers
+askpricesupplierMENU_LEFT_TITLE=Price request supplier
+askpricesupplierMENU_LEFT_TITLE_NEW=New request
+askpricesupplierMENU_LEFT_TITLE_LIST=List
+CommRequest=Price request
+CommRequests=Price requests
+SearchRequest=Find a request
+DraftRequests=Draft requests
+LastModifiedRequests=Last %s modified price requests
+RequestsOpened=Opened price requests
+AskPriceSupplierArea=Area price requests suppliers
+Askpricesupplier=Price request supplier
+NewAskPrice=New price request
+NewAsk=New request
+ShowAskpricesupplier=Show price request
+AddAskPriceSupplier=Create a price request
+AskPriceSupplierRefFourn=Supplier ref
+AskPriceSupplierDate=Delivery date
+AskPriceSupplierRefFournNotice=Before closing to "Accepted", think to grasp suppliers references.
+RelatedAskPriceSupplier=Related price requests suppliers
+ConfirmValidateAsk=Are you sure you want to validate this price request under name %s ?
+DateAsk=Date of request
+DeleteAsk=Delete request
+ValidateAsk=Validate request
+AddAsk=Create a request
+AskpricesupplierDraft=Drafts
+AskpricesupplierOpened=Opened
+AskpricesupplierStatusDraft=Draft (needs to be validated)
+AskpricesupplierStatusValidated=Validated (request is open)
+AskpricesupplierStatusOpened=Validated (request is open)
+AskpricesupplierStatusClosed=Closed
+AskpricesupplierStatusSigned=Accepted
+AskpricesupplierStatusNotSigned=Refused
+AskpricesupplierStatusDraftShort=Draft
+AskpricesupplierStatusValidatedShort=Validated
+AskpricesupplierStatusOpenedShort=Opened
+AskpricesupplierStatusClosedShort=Closed
+AskpricesupplierStatusSignedShort=Accepted
+AskpricesupplierStatusNotSignedShort=Refused
+CopyAskFrom=Create price request by copying existing a request
+CreateEmptyAsk=Create blank request
+CloneAsk=Clone price request
+ConfirmCloneAsk=Are you sure you want to clone the price request %s ?
+ConfirmReOpenAsk=Are you sure you want to open back the price request %s ?
+SendAskByMail=Send price request by mail
+SendAskRef=Sending the price request %s
+AskPriceSupplierCard=Request card
+ConfirmDeleteAsk=Are you sure you want to delete this price request ?
+ActionsOnAskPriceSupplier=Events on price request
+DocModelAuroreDescription=A complete request model (logo...)
+CommercialAsk=Price request
+DefaultModelAskPriceSupplierCreate=Default model creation
+DefaultModelAskPriceSupplierToBill=Default template when closing a price request (accepted)
+DefaultModelAskPriceSupplierClosed=Default template when closing a price request (refused)
\ No newline at end of file
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 0f41a43c90f..01e6bab6266 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -294,6 +294,7 @@ UnitPriceHT=Unit price (net)
UnitPriceTTC=Unit price
PriceU=U.P.
PriceUHT=U.P. (net)
+AskPriceSupplierUHT=P.U. HT Requested
PriceUTTC=U.P.
Amount=Amount
AmountInvoice=Invoice amount
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index f5b39b3f704..d87601d8126 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -60,6 +60,7 @@ PredefinedMailTestHtml=This is a test mail (the word test must be in bold
PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__\n\nWe would like to warn you that the invoice __FACREF__ seems to not being payed. So this is the invoice in attachment again, as a reminder.\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendProposal=__CONTACTCIVNAME__\n\nYou will find here the commercial proposal __PROPREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
+PredefinedMailContentSendAskPriceSupplier=__CONTACTCIVNAME__\n\nYou will find here the price request __ASKREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendOrder=__CONTACTCIVNAME__\n\nYou will find here the order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendSupplierOrder=__CONTACTCIVNAME__\n\nYou will find here our order __ORDERREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 49e6a6a22ec..10195ce38aa 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -1158,6 +1158,7 @@ AskPriceSupplierPDFModules=Modèles de documents de demandes de prix fournisseur
AskPriceSupplierPDFModules=Modèles de documents de demandes de prix fournisseurs
FreeLegalTextOnAskPriceSupplier=Mention complémentaire sur les demandes de prix fournisseurs
WatermarkOnDraftAskPriceSupplier=Filigrane sur les brouillons de demandes de prix (aucun si vide)
+BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER=Saisir le compte bancaire cible lors de la demande de prix
##### Orders #####
OrdersSetup=Configuration du module Commandes
OrdersNumberingModules=Modèles de numérotation des commandes
diff --git a/htdocs/langs/fr_FR/askpricesupplier.lang b/htdocs/langs/fr_FR/askpricesupplier.lang
index 0eb72c68ab8..8891c8b7b76 100644
--- a/htdocs/langs/fr_FR/askpricesupplier.lang
+++ b/htdocs/langs/fr_FR/askpricesupplier.lang
@@ -22,30 +22,23 @@ AskPriceSupplierRefFournNotice=Avant de clôturer à "Acceptée", pensez à sais
RelatedAskPriceSupplier=Demandes de prix fournisseurs associées
ConfirmValidateAsk=Êtes-vous sûr de vouloir valider cette demande de prix sous la référence %s ?
DateAsk=Date de demande
-DateEndAsk=Date de fin de validité
-DateEndAskShort=Date de fin
DeleteAsk=Supprimer demande
ValidateAsk=Valider demande
AddAsk=Créer une demande
AskpricesupplierDraft=Brouillons
AskpricesupplierOpened=Ouvertes
-AskpricesupplierNotBilled=Non facturées
AskpricesupplierStatusDraft=Brouillon (à valider)
AskpricesupplierStatusValidated=Validée (demande ouverte)
AskpricesupplierStatusOpened=Validée (demande ouverte)
AskpricesupplierStatusClosed=Fermée
AskpricesupplierStatusSigned=Acceptée
AskpricesupplierStatusNotSigned=Refusée
-AskpricesupplierStatusBilled=Facturée
AskpricesupplierStatusDraftShort=Brouillon
AskpricesupplierStatusValidatedShort=Validée
AskpricesupplierStatusOpenedShort=Ouverte
AskpricesupplierStatusClosedShort=Fermée
AskpricesupplierStatusSignedShort=Acceptée
AskpricesupplierStatusNotSignedShort=Refusée
-AskpricesupplierStatusBilledShort=Facturée
-AskpricesupplierToClose=Demandes de prix à fermer
-AskpricesupplierToBill=Demandes de prix signées à facturer
CopyAskFrom=Créer demande/devis par recopie d'une demande existante
CreateEmptyAsk=Créer demande/devis vierge
CloneAsk=Cloner demande de prix
@@ -55,15 +48,9 @@ SendAskByMail=Envoyer demande de prix par email
SendAskRef=Envoi de la demande de prix %s
AskPriceSupplierCard=Fiche demande
ConfirmDeleteAsk=Êtes-vous sûr de vouloir effacer cette demande de prix %s ?
-ListOfAskPriceSupplier=Liste des devis/propositions commerciales
ActionsOnAskPriceSupplier=Événements sur la demande
DocModelAuroreDescription=Modèle de demande de prix fournisseur complet (logo…)
CommercialAsk=Demande de prix
-
DefaultModelAskPriceSupplierCreate=Modèle par défaut à la création
-DefaultModelAskPriceSupplierToBill=Modèle par défaut lors de la clôture d'une proposition commerciale (à facturer)
-DefaultModelAskPriceSupplierClosed=Modèle par défaut lors de la clôture d'une proposition commerciale (non facturée)
-DefaultAskDurationValidity=Délai de validité par défaut (en jours)
-
-##### Types de contacts #####
-TypeContact_askpricesupplier_external_CUSTOMER=Contact client suivi demande
\ No newline at end of file
+DefaultModelAskPriceSupplierToBill=Modèle par défaut lors de la clôture d'une demande de prix (à accéptée)
+DefaultModelAskPriceSupplierClosed=Modèle par défaut lors de la clôture d'une demande de prix (refusée)
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang
index 972fc5425fd..a3d9e75a4ac 100644
--- a/htdocs/langs/fr_FR/other.lang
+++ b/htdocs/langs/fr_FR/other.lang
@@ -60,7 +60,7 @@ PredefinedMailTestHtml=Ceci est un message de test (le mot test doit êtr
PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\nVeuillez trouver ci-joint la facture __FACREF__\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__ \n\nNous voudrions porter à votre connaissance que la facture __FACREF__ ne semble pas avoir été réglée. La voici donc, pour rappel, en pièce jointe.\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
PredefinedMailContentSendProposal=__CONTACTCIVNAME__\n\nVeuillez trouver ci-joint la proposition commerciale __PROPREF__\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
-PredefinedMailContentSendAskPriceSupplier=__CONTACTCIVNAME__\n\nVeuillez trouver ci-joint la demande commerciale __ASKREF__\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
+PredefinedMailContentSendAskPriceSupplier=__CONTACTCIVNAME__\n\nVeuillez trouver ci-joint la demande de prix __ASKREF__\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
PredefinedMailContentSendOrder=__CONTACTCIVNAME__\n\nVeuillez trouver ci-joint la commande __ORDERREF__\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
PredefinedMailContentSendSupplierOrder=__CONTACTCIVNAME__\n\nVeuillez trouver ci-joint notre commande __ORDERREF__\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__\n\nVeuillez trouver ci-joint la facture __FACREF__\n\n__PERSONALIZED__Cordialement\n\n__SIGNATURE__
|