[CORE] assainissement du code + traductions FR vers EN (#new_ask_price).

This commit is contained in:
phf 2015-02-04 15:39:57 +01:00
parent 6770e0415a
commit bcbf29d9a5
16 changed files with 211 additions and 1310 deletions

View File

@ -22,12 +22,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/admin/propal.php
* \ingroup propale
* \brief Setup page for commercial proposal module
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/comm/askpricesupplier/class/askpricesupplier.class.php';
@ -147,22 +141,6 @@ if ($action == 'set_ASKPRICESUPPLIER_FREE_TEXT')
}
}
if ($action == 'setdefaultduration')
{
$res = dolibarr_set_const($db, "ASKPRICESUPPLIER_VALIDITY_DURATION",$value,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
setEventMessage($langs->trans("SetupSaved"));
}
else
{
setEventMessage($langs->trans("Error"),'errors');
}
}
if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER')
{
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER",$value,'chaine',0,'',$conf->entity);
@ -282,7 +260,6 @@ print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
print '</tr>'."\n";
clearstatcache();
foreach ($dirmodels as $reldir)
{
$dir = dol_buildpath($reldir."core/modules/askpricesupplier/");
@ -296,7 +273,7 @@ foreach ($dirmodels as $reldir)
while (($file = readdir($handle))!==false)
{
if (substr($file, 0, 12) == 'mod_askpricesupplier_' && substr($file, dol_strlen($file)-3, 3) == 'php')
if (substr($file, 0, 21) == 'mod_askpricesupplier_' && substr($file, dol_strlen($file)-3, 3) == 'php')
{
$file = substr($file, 0, dol_strlen($file)-4);
@ -546,32 +523,6 @@ print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
print "<td>&nbsp;</td>\n";
print "</tr>";
$var=!$var;
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"setdefaultduration\">";
print "<tr ".$bc[$var].">";
print '<td>'.$langs->trans("DefaultAskDurationValidity").'</td>';
print '<td width="60" align="center">'."<input size=\"3\" class=\"flat\" type=\"text\" name=\"value\" value=\"".$conf->global->ASKPRICESUPPLIER_VALIDITY_DURATION."\"></td>";
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr>';
print '</form>';
/*
$var=! $var;
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setusecustomercontactasrecipient">';
print '<tr '.$bc[$var].'><td>';
print $langs->trans("UseCustomerContactAsPropalRecipientIfExist");
print '</td><td width="60" align="center">';
print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
*/
$var=! $var;
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -622,7 +573,7 @@ else
{
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPLLIER").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
}
print '</table>';

View File

@ -18,12 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/comm/admin/propal_extrafields.php
* \ingroup propal
* \brief Page to setup extra fields of third party
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/askpricesupplier.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@ -59,7 +53,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
$textobject=$langs->transnoentitiesnoconv("Proposals");
$textobject=$langs->transnoentitiesnoconv("CommRequests");
llxHeader('',$langs->trans("AskPriceSupplierSetup"));
@ -69,7 +63,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'setup');
$head = propal_admin_prepare_head();
$head = askpricesupplier_admin_prepare_head();
dol_fiche_head($head, 'attributes', $langs->trans("CommRequests"), 0, 'askpricesupplier');

View File

@ -21,12 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/comm/admin/propaldet_extrafields.php
* \ingroup order
* \brief Page to setup extra fields of order
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/askpricesupplier.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@ -74,7 +68,7 @@ llxHeader('',$langs->trans("AskPriceSupplierSetup"));
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'setup');
$head = propal_admin_prepare_head();
$head = askpricesupplier_admin_prepare_head();
dol_fiche_head($head, 'attributeslines', $langs->trans("CommRequests"), 0, 'askpricesupplier');

View File

@ -25,11 +25,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/comm/propal.php
* \ingroup propale
* \brief Page of commercial proposals card and list
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
@ -135,7 +130,7 @@ if (empty($reshook))
}
}
// Delete proposal
// Delete askprice
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->askpricesupplier->supprimer)
{
$result = $object->delete($user);
@ -207,29 +202,6 @@ if (empty($reshook))
}
}
else if ($action == 'setdate' && $user->rights->askpricesupplier->creer)
{
$datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
/* PHFAVRE
if (empty($datep)) {
$error ++;
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), 'errors');
}
*/
if (! $error) {
$result = $object->set_date($user, $datep);
if ($result < 0)
dol_print_error($db, $object->error);
}
}
else if ($action == 'setecheance' && $user->rights->askpricesupplier->creer)
{
$result = $object->set_echeance($user, dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']));
if ($result < 0)
dol_print_error($db, $object->error);
}
else if ($action == 'setdate_livraison' && $user->rights->askpricesupplier->creer)
{
$result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']));
@ -237,29 +209,14 @@ if (empty($reshook))
dol_print_error($db, $object->error);
}
// Positionne ref client
else if ($action == 'set_ref_client' && $user->rights->askpricesupplier->creer)
{
$object->set_ref_client($user, $_POST['ref_client']);
}
// Create proposal
// Create askprice
else if ($action == 'add' && $user->rights->askpricesupplier->creer)
{
$object->socid = $socid;
$object->fetch_thirdparty();
$datep = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$date_delivery = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year'));
/* PHFAVRE
if (empty($datep)) {
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), 'errors');
$action = 'create';
$error ++;
}
*/
if ($socid < 1) {
setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), 'errors');
$action = 'create';
@ -270,25 +227,19 @@ if (empty($reshook))
{
$db->begin();
// Si on a selectionne une propal a copier, on realise la copie
// Si on a selectionne une demande a copier, on realise la copie
if (GETPOST('createmode') == 'copy' && GETPOST('copie_askpricesupplier'))
{
if ($object->fetch(GETPOST('copie_askpricesupplier')) > 0) {
$object->ref = GETPOST('ref');
$object->datep = $datep;
$object->date_livraison = $date_delivery;
$object->availability_id = GETPOST('availability_id');
$object->demand_reason_id = GETPOST('demand_reason_id');
$object->fk_delivery_address = GETPOST('fk_address');
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
$object->duree_validite = $duration;
$object->cond_reglement_id = GETPOST('cond_reglement_id');
$object->mode_reglement_id = GETPOST('mode_reglement_id');
$object->fk_account = GETPOST('fk_account', 'int');
$object->fk_account = GETPOST('fk_account', 'int');
$object->remise_percent = GETPOST('remise_percent');
$object->remise_absolue = GETPOST('remise_absolue');
$object->socid = GETPOST('socid');
$object->contactid = GETPOST('contactid');
$object->fk_project = GETPOST('projectid');
$object->modelpdf = GETPOST('model');
$object->author = $user->id; // deprecated
@ -301,18 +252,12 @@ if (empty($reshook))
}
} else {
$object->ref = GETPOST('ref');
$object->ref_client = GETPOST('ref_client');
$object->datep = $datep;
$object->date_livraison = $date_delivery;
$object->availability_id = GETPOST('availability_id');
$object->demand_reason_id = GETPOST('demand_reason_id');
$object->fk_delivery_address = GETPOST('fk_address');
$object->shipping_method_id = GETPOST('shipping_method_id', 'int');
$object->duree_validite = GETPOST('duree_validite');
$object->cond_reglement_id = GETPOST('cond_reglement_id');
$object->mode_reglement_id = GETPOST('mode_reglement_id');
$object->fk_account = GETPOST('fk_account', 'int');
$object->contactid = GETPOST('contactid');
$object->fk_account = GETPOST('fk_account', 'int');
$object->fk_project = GETPOST('projectid');
$object->modelpdf = GETPOST('model');
$object->author = $user->id; // deprecated
@ -343,31 +288,9 @@ if (empty($reshook))
{
if ($origin && $originid)
{
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs [1];
$subelement = $regs [2];
}
// For compatibility
if ($element == 'order') {
$element = $subelement = 'commande';
}
if ($element == 'askpricesupplier') {
$element = 'comm/askpricesupplier';
$subelement = 'askpricesupplier';
}
if ($element == 'contract') {
$element = $subelement = 'contrat';
}
if ($element == 'inter') {
$element = $subelement = 'ficheinter';
}
if ($element == 'shipping') {
$element = $subelement = 'expedition';
}
$element = 'comm/askpricesupplier';
$subelement = 'askpricesupplier';
$object->origin = $origin;
$object->origin_id = $originid;
@ -404,54 +327,36 @@ if (empty($reshook))
$label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
// Positive line
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0);
// Positive line
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0);
// Date start
$date_start = false;
if ($lines[$i]->date_debut_prevue)
$date_start = $lines[$i]->date_debut_prevue;
if ($lines[$i]->date_debut_reel)
$date_start = $lines[$i]->date_debut_reel;
if ($lines[$i]->date_start)
$date_start = $lines[$i]->date_start;
// Reset fk_parent_line for no child products and special product
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
$fk_parent_line = 0;
}
// Date end
$date_end = false;
if ($lines[$i]->date_fin_prevue)
$date_end = $lines[$i]->date_fin_prevue;
if ($lines[$i]->date_fin_reel)
$date_end = $lines[$i]->date_fin_reel;
if ($lines[$i]->date_end)
$date_end = $lines[$i]->date_end;
// Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$array_option = $lines[$i]->array_options;
}
// Reset fk_parent_line for no child products and special product
if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) {
$fk_parent_line = 0;
}
$tva_tx=get_default_tva($mysoc, $object->thirdparty);
// Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$array_option = $lines[$i]->array_options;
}
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_option);
$tva_tx=get_default_tva($mysoc, $object->thirdparty);
if ($result > 0) {
$lineid = $result;
} else {
$lineid = 0;
$error ++;
break;
}
$result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_option);
if ($result > 0) {
$lineid = $result;
} else {
$lineid = 0;
$error ++;
break;
}
// Defined the new fk_parent_line
if ($result > 0 && $lines[$i]->product_type == 9) {
$fk_parent_line = $result;
}
// Defined the new fk_parent_line
if ($result > 0 && $lines[$i]->product_type == 9) {
$fk_parent_line = $result;
}
}
// Hooks
@ -476,17 +381,6 @@ if (empty($reshook))
if ($id > 0)
{
// Insertion contact par defaut si defini
if (GETPOST('contactid') > 0)
{
$result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external');
if ($result < 0)
{
$error++;
setEventMessage($langs->trans("ErrorFailedToAddContact"), 'errors');
}
}
if (! $error)
{
$db->commit();
@ -528,24 +422,6 @@ if (empty($reshook))
}
}
// Classify billed
else if ($action == 'classifybilled' && $user->rights->askpricesupplier->cloturer) {
$object->cloture($user, 4, '');
}
// Reopen proposal
else if ($action == 'confirm_reopen' && $user->rights->askpricesupplier->cloturer && ! GETPOST('cancel')) {
// prevent browser refresh from reopening proposal several times
if ($object->statut == 2 || $object->statut == 3 || $object->statut == 4) {
$object->reopen($user, 1);
}
}
// Classify billed
else if ($action == 'classifybilled' && $user->rights->askpricesupplier->cloturer) {
$object->cloture($user, 4, '');
}
// Reopen proposal
else if ($action == 'confirm_reopen' && $user->rights->askpricesupplier->cloturer && ! GETPOST('cancel')) {
// prevent browser refresh from reopening proposal several times
@ -787,9 +663,6 @@ if (empty($reshook))
$fournprice = (GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : '');
$buyingprice = (GETPOST('buying_price' . $predef) ? GETPOST('buying_price' . $predef) : '');
$date_start = dol_mktime(0, 0, 0, GETPOST('date_start' . $predef . 'month'), GETPOST('date_start' . $predef . 'day'), GETPOST('date_start' . $predef . 'year'));
$date_end = dol_mktime(0, 0, 0, GETPOST('date_end' . $predef . 'month'), GETPOST('date_end' . $predef . 'day'), GETPOST('date_end' . $predef . 'year'));
// Local Taxes
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty);
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty);
@ -804,7 +677,7 @@ if (empty($reshook))
} else {
// Insert line
$ref_fourn = GETPOST('fourn_ref');
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $pu_ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $date_start, $date_end, $array_option, $ref_fourn);
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $pu_ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_option, $ref_fourn);
if ($result > 0) {
$db->commit();
@ -839,18 +712,6 @@ if (empty($reshook))
unset($_POST['dp_desc']);
unset($_POST['idprod']);
unset($_POST['date_starthour']);
unset($_POST['date_startmin']);
unset($_POST['date_startsec']);
unset($_POST['date_startday']);
unset($_POST['date_startmonth']);
unset($_POST['date_startyear']);
unset($_POST['date_endhour']);
unset($_POST['date_endmin']);
unset($_POST['date_endsec']);
unset($_POST['date_endday']);
unset($_POST['date_endmonth']);
unset($_POST['date_endyear']);
} else {
$db->rollback();
@ -860,7 +721,7 @@ if (empty($reshook))
}
}
// Mise a jour d'une ligne dans la propale
// Mise a jour d'une ligne dans la demande de prix
else if ($action == 'updateligne' && $user->rights->askpricesupplier->creer && GETPOST('save') == $langs->trans("Save")) {
// Define info_bits
$info_bits = 0;
@ -875,15 +736,12 @@ if (empty($reshook))
$vat_rate = str_replace('*', '', $vat_rate);
$localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty);
$localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty);
$pu_ht = GETPOST('price_ht');
$pu_ht = GETPOST('price_ht') ? GETPOST('price_ht') : 0;
// Add buying price
$fournprice = (GETPOST('fournprice') ? GETPOST('fournprice') : '');
$buyingprice = (GETPOST('buying_price') ? GETPOST('buying_price') : '');
$date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
$date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
// Extrafields
$extrafieldsline = new ExtraFields($db);
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
@ -932,7 +790,7 @@ if (empty($reshook))
if (! $error) {
$db->begin();
$ref_fourn = GETPOST('fourn_ref');
$result = $object->updateline(GETPOST('lineid'), $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $date_start, $date_end, $array_option, $ref_fourn);
$result = $object->updateline(GETPOST('lineid'), $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $array_option, $ref_fourn);
if ($result >= 0) {
$db->commit();
@ -1025,11 +883,6 @@ if (empty($reshook))
$result = $object->availability($_POST['availability_id']);
}
// Origine de la propale
else if ($action == 'setdemandreason' && $user->rights->askpricesupplier->creer) {
$result = $object->demand_reason($_POST['demand_reason_id']);
}
// Conditions de reglement
else if ($action == 'setconditions' && $user->rights->askpricesupplier->creer) {
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
@ -1115,51 +968,6 @@ if (empty($reshook))
if ($error)
$action = 'edit_extras';
}
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->askpricesupplier->creer)
{
if ($action == 'addcontact')
{
if ($object->id > 0) {
$contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid'));
$result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]);
}
if ($result >= 0) {
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
exit();
} else {
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
$langs->load("errors");
setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors');
} else {
setEventMessage($object->error, 'errors');
}
}
}
// Bascule du statut d'un contact
else if ($action == 'swapstatut') {
if ($object->fetch($id) > 0) {
$result = $object->swapContactStatus(GETPOST('ligne'));
} else {
dol_print_error($db);
}
}
// Efface un contact
else if ($action == 'deletecontact') {
$object->fetch($id);
$result = $object->delete_contact($lineid);
if ($result >= 0) {
header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id);
exit();
} else {
dol_print_error($db);
}
}
}
}
@ -1167,7 +975,7 @@ if (empty($reshook))
* View
*/
llxHeader('', $langs->trans('CommRequests'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
llxHeader('', $langs->trans('CommRequests'), 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur');
$form = new Form($db);
$formother = new FormOther($db);
@ -1177,7 +985,7 @@ $companystatic = new Societe($db);
$now = dol_now();
// Add new proposal
// Add new askprice
if ($action == 'create')
{
print_fiche_titre($langs->trans("NewAskPrice"));
@ -1189,58 +997,32 @@ if ($action == 'create')
// Load objectsrc
if (! empty($origin) && ! empty($originid))
{
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs [1];
$subelement = $regs [2];
$element = 'comm/askpricesupplier';
$subelement = 'askpricesupplier';
dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
$classname = ucfirst($subelement);
$objectsrc = new $classname($db);
$objectsrc->fetch($originid);
if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines'))
{
$objectsrc->fetch_lines();
}
$objectsrc->fetch_thirdparty();
if ($element == 'project') {
$projectid = $originid;
} else {
// For compatibility
if ($element == 'order' || $element == 'commande') {
$element = $subelement = 'commande';
}
if ($element == 'askpricesupplier') {
$element = 'comm/askpricesupplier';
$subelement = 'askpricesupplier';
}
if ($element == 'contract') {
$element = $subelement = 'contrat';
}
if ($element == 'shipping') {
$element = $subelement = 'expedition';
}
$projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : '');
$soc = $objectsrc->thirdparty;
dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
$cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1));
$mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));
$remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0));
$remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0));
$classname = ucfirst($subelement);
$objectsrc = new $classname($db);
$objectsrc->fetch($originid);
if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines'))
{
$objectsrc->fetch_lines();
}
$objectsrc->fetch_thirdparty();
$projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : '');
$ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
$ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
$soc = $objectsrc->thirdparty;
$cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1));
$mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0));
$remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0));
$remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0));
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice);
// Replicate extrafields
$objectsrc->fetch_optionals($originid);
$object->array_options = $objectsrc->array_options;
}
// Replicate extrafields
$objectsrc->fetch_optionals($originid);
$object->array_options = $objectsrc->array_options;
}
$object = new AskPriceSupplier($db);
@ -1260,13 +1042,6 @@ if ($action == 'create')
// Reference
print '<tr><td class="fieldrequired">' . $langs->trans('Ref') . '</td><td colspan="2">' . $langs->trans("Draft") . '</td></tr>';
// Ref customer
/* PHFAVRE retrait en temporaire
print '<tr><td>' . $langs->trans('RefCustomer') . '</td><td colspan="2">';
print '<input type="text" name="ref_client" value=""></td>';
print '</tr>';
*/
// Third party
print '<tr>';
print '<td class="fieldrequired">' . $langs->trans('Supplier') . '</td>';
@ -1282,47 +1057,6 @@ if ($action == 'create')
}
print '</tr>' . "\n";
// Contacts (ask contact only if thirdparty already defined). TODO do this also into order and invoice.
/* PHFAVRE retrait en temporaire
if ($socid > 0)
{
print "<tr><td>" . $langs->trans("DefaultContact") . '</td><td colspan="2">';
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
print '</td></tr>';
}
if ($socid > 0)
{
// Ligne info remises tiers
print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="2">';
if ($soc->remise_percent)
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
else
print $langs->trans("CompanyHasNoRelativeDiscount");
$absolute_discount = $soc->getAvailableDiscounts();
print '. ';
if ($absolute_discount)
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency" . $conf->currency));
else
print $langs->trans("CompanyHasNoAbsoluteDiscount");
print '.';
print '</td></tr>';
}
*/
// Date
/* PHFAVRE retrait en temporaire
print '<tr><td class="fieldrequired">' . $langs->trans('AskPriceSupplierDate') . '</td><td colspan="2">';
$form->select_date('', '', '', '', '', "addask", 1, 1);
print '</td></tr>';
*/
// Validaty duration
/* PHFAVRE retrait en temporaire
print '<tr><td class="fieldrequired">' . $langs->trans("ValidityDuration") . '</td><td colspan="2"><input name="duree_validite" size="5" value="' . $conf->global->ASKPRICESUPPLIER_VALIDITY_DURATION . '"> ' . $langs->trans("days") . '</td></tr>';
*/
// Terms of payment
print '<tr><td class="nowrap fieldrequired">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
$form->select_conditions_paiements($soc->cond_reglement_id, 'cond_reglement_id');
@ -1339,20 +1073,6 @@ if ($action == 'create')
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
print '</td></tr>';
}
// What trigger creation
/* PHFAVRE retrait en temporaire
print '<tr><td>' . $langs->trans('Source') . '</td><td>';
$form->selectInputReason('', 'demand_reason_id', "SRC_PROP", 1);
print '</td></tr>';
*/
// Delivery delay
/* PHFAVRE retrait en temporaire
print '<tr><td>' . $langs->trans('AvailabilityPeriod') . '</td><td colspan="2">';
$form->selectAvailabilityDelay('', 'availability_id', '', 1);
print '</td></tr>';
*/
// Shipping Method
if (! empty($conf->expedition->enabled)) {
@ -1435,17 +1155,7 @@ if ($action == 'create')
print '<input type="hidden" name="origin" value="' . $objectsrc->element . '">';
print '<input type="hidden" name="originid" value="' . $objectsrc->id . '">';
$newclassname = $classname;
if ($newclassname == 'Askpricesupplier')
$newclassname = 'CommRequest';
elseif ($newclassname == 'Commande')
$newclassname = 'Order';
elseif ($newclassname == 'Expedition')
$newclassname = 'Sending';
elseif ($newclassname == 'Fichinter')
$newclassname = 'Intervention';
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
print '<tr><td>' . $langs->trans('CommRequest') . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1
@ -1543,7 +1253,6 @@ if ($action == 'create')
dol_fiche_end();
$langs->load("bills");
print '<div class="center">';
print '<input type="submit" class="button" value="' . $langs->trans("CreateDraft") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
@ -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 '<tr><td>' . $langs->trans('Ref') . '</td><td colspan="5">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
print '</td></tr>';
// Ref customer
/* PHFAVRE retrait en temporaire
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer') . '</td>';
if ($action != 'refclient' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=refclient&amp;id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a></td>';
print '</td>';
print '</tr></table>';
print '</td><td colspan="5">';
if ($user->rights->askpricesupplier->creer && $action == 'refclient') {
print '<form action="askpricesupplier.php?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_ref_client">';
print '<input type="text" class="flat" size="20" name="ref_client" value="' . $object->ref_client . '">';
print ' <input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $object->ref_client;
}
print '</td>';
print '</tr>';
*/
// Company
print '<tr><td>' . $langs->trans('Supplier') . '</td><td colspan="5">' . $soc->getNomUrl(1) . '</td>';
print '</tr>';
// Ligne info remises tiers
/* PHFAVRE retrait en temporaire
print '<tr><td>' . $langs->trans('Discounts') . '</td><td colspan="5">';
if ($soc->remise_percent)
print $langs->trans("CompanyHasRelativeDiscount", $soc->remise_percent);
else
print $langs->trans("CompanyHasNoRelativeDiscount");
print '. ';
$absolute_discount = $soc->getAvailableDiscounts('', 'fk_facture_source IS NULL');
$absolute_creditnote = $soc->getAvailableDiscounts('', 'fk_facture_source IS NOT NULL');
$absolute_discount = price2num($absolute_discount, 'MT');
$absolute_creditnote = price2num($absolute_creditnote, 'MT');
if ($absolute_discount) {
if ($object->statut > 0) {
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount, 0, $langs, 0, 0, -1, $conf->currency));
} else {
// Remise dispo de type non avoir
$filter = 'fk_facture_source IS NULL';
print '<br>';
$form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filter);
}
}
if ($absolute_creditnote) {
print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote, 0, $langs, 0, 0, -1, $conf->currency)) . '. ';
}
if (! $absolute_discount && ! $absolute_creditnote)
print $langs->trans("CompanyHasNoAbsoluteDiscount") . '.';
print '</td></tr>';
*/
// Date of proposal
/* PHFAVRE retrait en temporaire
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('AskPriceSupplierDate');
print '</td>';
if ($action != 'editdate' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if (! empty($object->brouillon) && $action == 'editdate') {
print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setdate">';
$form->select_date($object->date, 're', '', '', 0, "editdate");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
if ($object->date) {
print dol_print_date($object->date, 'daytext');
} else {
print '&nbsp;';
}
}
print '</td>';
*/
// Date end proposal
/* PHFAVRE retrait en temporaire
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('DateEndAsk');
print '</td>';
if ($action != 'editecheance' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editecheance&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if (! empty($object->brouillon) && $action == 'editecheance') {
print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setecheance">';
$form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance");
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
if (! empty($object->fin_validite)) {
print dol_print_date($object->fin_validite, 'daytext');
if ($object->statut == 1 && $object->fin_validite < ($now - $conf->askpricesupplier->cloture->warning_delay))
print img_warning($langs->trans("Late"));
} else {
print '&nbsp;';
}
}
print '</td>';
print '</tr>';
*/
// Payment term
print '<tr><td>';
@ -1812,69 +1408,6 @@ if ($action == 'create')
print '</td>';
print '</tr>';
// Delivery delay
/* PHFAVRE retrait en temporaire
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('AvailabilityPeriod');
if (! empty($conf->commande->enabled))
print ' (' . $langs->trans('AfterOrder') . ')';
print '</td>';
if ($action != 'editavailability' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editavailability') {
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
} else {
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'none', 1);
}
print '</td>';
print '</tr>';
*/
// Shipping Method
/* PHFAVRE retrait en temporaire
if (! empty($conf->expedition->enabled)) {
print '<tr><td>';
print '<table width="100%" class="nobordernopadding"><tr><td>';
print $langs->trans('SendingMethod');
print '</td>';
if ($action != 'editshippingmethod' && $user->rights->propal->creer)
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&amp;id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'),1).'</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editshippingmethod') {
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1);
} else {
$form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'none');
}
print '</td>';
print '</tr>';
}
*/
// Origin of demand
/* PHFAVRE retrait en temporaire
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Source');
print '</td>';
if ($action != 'editdemandreason' && ! empty($object->brouillon))
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'editdemandreason') {
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
} else {
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none');
}
print '</td>';
print '</tr>';
*/
// Payment mode
print '<tr>';
print '<td width="25%">';
@ -1893,7 +1426,6 @@ if ($action == 'create')
print '</td></tr>';
// Project
if (! empty($conf->projet->enabled)) {
$langs->load("projects");
print '<tr><td>';
@ -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 '</table>';
print "</form>\n";
@ -2132,11 +1646,7 @@ if ($action == 'create')
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=validate">' . $langs->trans('Validate') . '</a></div>';
// else print '<a class="butActionRefused" href="#">'.$langs->trans('Validate').'</a>';
}
// 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 '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a>';
}
// Edit
if ($object->statut == 1 && $user->rights->askpricesupplier->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=modif">' . $langs->trans('Modify') . '</a></div>';
@ -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 '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a></div>';
}
}
// Create an invoice and classify billed
if ($object->statut == 2) {
if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
{
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/compta/facture.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans("AddBill") . '</a></div>';
}
$arrayofinvoiceforpropal = $object->getInvoiceArrayList();
if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || ! empty($conf->global->WORKFLOW_PROPAL_CAN_CLASSIFIED_BILLED_WITHOUT_INVOICES))
{
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=classifybilled&amp;socid=' . $object->socid . '">' . $langs->trans("ClassifyBilled") . '</a></div>';
}
}
// Close
if ($object->statut == 1 && $user->rights->askpricesupplier->cloturer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=statut' . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close') . '"';
@ -2212,8 +1699,6 @@ if ($action == 'create')
if ($action != 'presend')
{
print '<div class="fichecenter"><div class="fichehalfleft">';
// print '<table width="100%"><tr><td width="50%" valign="top">';
// print '<a name="builddoc"></a>'; // ancre
/*
* Documents generes
@ -2234,14 +1719,12 @@ if ($action == 'create')
$somethingshown = $object->showLinkedObjectBlock();
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
// print '</td><td valign="top" width="50%">';
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'askpricesupplier', $socid);
// print '</td></tr></table>';
print '</div></div></div>';
}
@ -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';

File diff suppressed because it is too large Load Diff

View File

@ -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`),

View File

@ -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,

View File

@ -17,11 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/comm/propal/tpl/linkedobjectblock.tpl.php
* \ingroup propal
* \brief Template to show objects linked to proposals
*/
?>
<!-- BEGIN PHP TEMPLATE -->

View File

@ -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;
*
*/
}

View File

@ -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

View File

@ -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 <b>%s</b> ?
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 <b>%s</b> ?
ConfirmReOpenAsk=Are you sure you want to open back the price request <b>%s</b> ?
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)

View File

@ -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

View File

@ -60,6 +60,7 @@ PredefinedMailTestHtml=This is a <b>test</b> 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__

View File

@ -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

View File

@ -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 <b>%s</b> ?
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 <b>%s</b> ?
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
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)

View File

@ -60,7 +60,7 @@ PredefinedMailTestHtml=Ceci est un message de <b>test</b> (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__