From 98e2919698154e36b05d3cbffd940f71c86cb75c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 25 May 2006 14:41:44 +0000 Subject: [PATCH] =?UTF-8?q?New:=20La=20remise=20relative=20par=20d=E9faut?= =?UTF-8?q?=20d'une=20soci=E9t=E9=20se=20positionne=20sur=20la=20ligne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/addpropal.php | 10 ++- htdocs/comm/propal.php | 38 ++++++++--- htdocs/comm/remise.php | 3 +- htdocs/commande/fiche.php | 73 ++++++++++++++++----- htdocs/compta/facture.php | 105 ++++++++++++++++++++---------- htdocs/compta/propal.php | 20 +++++- htdocs/contrat/fiche.php | 44 ++++++++++--- htdocs/langs/en_US/bills.lang | 1 + htdocs/langs/fr_FR/bills.lang | 1 + htdocs/langs/fr_FR/companies.lang | 7 +- 10 files changed, 223 insertions(+), 79 deletions(-) diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php index 3d47b5175f8..d866ec8afa7 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -126,6 +126,8 @@ if ($_GET["action"] == 'create') print ''; // Réductions relatives (Remises-Ristournes-Rabbais) +/* Une réduction doit s'appliquer obligatoirement sur des lignes de factures + et non globalement car une tva est obligatoire meme sur une reduc $relative_discount=$soc->remise_client; print ''.$langs->trans("CustomerRelativeDiscount").''; print ''; @@ -140,8 +142,10 @@ if ($_GET["action"] == 'create') print $langs->trans("CompanyHasNoRelativeDiscount"); } print ''; +*/ // Réductions absolues (Remises-Ristournes-Rabbais) +/* Les remises absolues doivent s'appliquer par ajout de lignes spécialisées $absolute_discount=$soc->getCurrentDiscount(); print ''.$langs->trans("CustomerAbsoluteDiscount").''; print ''; @@ -156,7 +160,7 @@ if ($_GET["action"] == 'create') print $langs->trans("CompanyHasNoAbsoluteDiscount"); } print ''; - +*/ // Date de livraison if ($conf->global->PROPAL_ADD_SHIPPING_DATE) @@ -177,6 +181,7 @@ if ($_GET["action"] == 'create') } print ''; } +*/ // Adresse de livraison if ($conf->global->PROPAL_ADD_DELIVERY_ADDRESS) @@ -320,7 +325,8 @@ if ($_GET["action"] == 'create') $html->select_produits('',"idprod".$i,'',$conf->produit->limit_size); print ''; print ''; - print '%'; + print '%'; + print ''; } print ""; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 88ad6cbd7a6..7578d315810 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -589,9 +589,21 @@ if ($_GET['propalid'] > 0) { $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$societe->id; } - print ''.$societe->nom.''; + print ''.$societe->nom.''; + print ''; print ''; + // Ligne info remises tiers + print ''.$langs->trans('Info').''; + if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $aboslute_discount=$societe->getCurrentDiscount(); + print '. '; + if ($aboslute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print ''; + // Dates print ''.$langs->trans('Date').''; print dolibarr_print_date($propal->date,'%a %d %B %Y'); @@ -832,7 +844,7 @@ if ($_GET['propalid'] > 0) print ''.$langs->trans('VAT').''; print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('Qty').''; - print ''.$langs->trans('Discount').''; + print ''.$langs->trans('ReductionShort').''; print ''.$langs->trans('AmountHT').''; print ' '; print ' '; @@ -954,7 +966,7 @@ if ($_GET['propalid'] > 0) print ''; print ''; print ''; - print '%'; + print '%'; print ''; print '
'; print '' . "\n"; @@ -989,7 +1001,8 @@ if ($_GET['propalid'] > 0) * Lignes de remise */ - // Remise relative + // Réductions relatives (Remises-Ristournes-Rabbais) +/* Une réduction doit s'appliquer obligatoirement sur des lignes de factures $var=!$var; print '
'; print ''; @@ -1004,7 +1017,7 @@ if ($_GET['propalid'] > 0) print ''; if ($_GET['action'] == 'editrelativediscount') { - print '%'; + print '%'; } else { @@ -1043,8 +1056,10 @@ if ($_GET['propalid'] > 0) } print ''; print ''; +*/ - // Remise absolue + // Réductions absolues (Remises-Ristournes-Rabbais) +/* Les remises absolues doivent s'appliquer par ajout de lignes spécialisées $var=!$var; print '
'; print ''; @@ -1095,7 +1110,7 @@ if ($_GET['propalid'] > 0) } print ''; print '
'; - +*/ /* * Ajouter une ligne @@ -1107,7 +1122,7 @@ if ($_GET['propalid'] > 0) print ''.$langs->trans('VAT').''; print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('Qty').''; - print ''.$langs->trans('Discount').''; + print ''.$langs->trans('ReductionShort').''; print ' '; print ' '; print ' '; @@ -1135,7 +1150,7 @@ if ($_GET['propalid'] > 0) print "\n"; print ''; print ''; - print '%'; + print '%'; print ''; print ''; @@ -1166,7 +1181,8 @@ if ($_GET['propalid'] > 0) print ''; print ' '; print ''; - print '%'; + print '%'; + print ''; print ''."\n"; @@ -1538,6 +1554,8 @@ else { $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$objp->idp; } + + // Société print ''.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''; // Date propale diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index f9cfdc31213..427870571a5 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -36,8 +36,9 @@ $user->getrights('commande'); $user->getrights('projet'); -$langs->load("orders"); $langs->load("companies"); +$langs->load("orders"); +$langs->load("bills"); if ($_POST["action"] == 'setremise') diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 831786ae58c..e9295c0749c 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -495,14 +495,14 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print '
'; print ''; print '' ."\n"; - print ''; + print ''; print ''; print ''; // Reference - print ''; - print ''; + print ''; + print ''; // Reference client print ''; print ''; + // Ligne info remises tiers + print ''; + + // Date print ''; @@ -554,6 +566,8 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print ''; // Réductions relatives (Remises-Ristournes-Rabbais) +/* Une réduction doit s'appliquer obligatoirement sur des lignes de factures + et non globalement $relative_discount=$soc->remise_client; print ''; print ''; +*/ // Réductions (Remises-Ristournes-Rabbais) +/* Les remises absolues doivent s'appliquer par ajout de lignes spécialisées $absolute_discount=$soc->getCurrentDiscount(); print ''; print ''; - +*/ // Projet if ($conf->projet->enabled) @@ -601,7 +617,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; // Lignes de propal produits prédéfinis $sql = 'SELECT pt.rowid, p.label as product, p.ref, pt.tva_tx, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent, pt.description'; @@ -1070,7 +1092,7 @@ if ($_GET['action'] == 'create') print ''; print ''; print ''; - print ''; + print ''; $sql = 'SELECT pt.rowid, pt.subprice, pt.tva_tx, pt.qty, pt.remise_percent, pt.description,'; $sql.= ' p.label as product, p.ref, p.rowid as prodid'; @@ -1153,7 +1175,7 @@ if ($_GET['action'] == 'create') print ''; print ''; print ''; - print ''; + print ''; // Lignes de contrat produits prédéfinis $sql = 'SELECT pt.rowid, pt.subprice, pt.tva_tx, pt.qty, pt.remise_percent, pt.description,'; @@ -1317,6 +1339,17 @@ else print ''.$soc->nom.''; print ''; + // Ligne info remises tiers + print ''; + // Dates print ''; print ''; @@ -1555,7 +1588,7 @@ else print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -1817,7 +1850,7 @@ else print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -1906,7 +1939,7 @@ else print '
'; // Récurrente - if (! defined('FACTURE_DISABLE_RECUR') || FACTURE_DISABLE_RECUR == 0) // Possibilité de désactiver les factures récurrentes + if (! $conf->global->FACTURE_DISABLE_RECUR) { print ' '.$langs->trans("ChangeIntoRepeatableInvoice").''; } diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index d591c1c8095..ebc89e4a964 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -39,6 +39,7 @@ $user->getrights('propale'); if (!$user->rights->propale->lire) accessforbidden(); +$langs->load('companies'); $langs->load('compta'); @@ -193,6 +194,17 @@ if ($_GET["propalid"] > 0) print ''.$societe->nom.''; print '
'; + // Ligne info remises tiers + print ''; + // Dates print ''; print ''; +*/ // Remise absolue +/* Les remises absolues doivent s'appliquer par ajout de lignes spécialisées $var=!$var; print ''; print ''; @@ -554,7 +570,7 @@ if ($_GET["propalid"] > 0) } print ''; print ''; - +*/ print '
'.$langs->trans('Ref').'Provisoire'.$langs->trans('Comments').'
'.$langs->trans('Ref').''.$langs->trans("Provisoire").''.$langs->trans('NotePublic').'
'.$langs->trans('RefCustomer').''; @@ -514,6 +514,18 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print '
'.$langs->trans('Customer').''.img_object($langs->trans("ShowCompany"),'company').' '.$soc->nom_url.'
'.$langs->trans('Info').''; + if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $aboslute_discount=$soc->getCurrentDiscount(); + print '. '; + if ($aboslute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '
'.$langs->trans('Date').''; $html->select_date('','re','','','',"crea_commande"); print '
'.$langs->trans("CustomerRelativeDiscount").''; @@ -568,8 +582,10 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print $langs->trans("CompanyHasNoRelativeDiscount"); } print '
'.$langs->trans("CustomerAbsoluteDiscount").''; @@ -584,7 +600,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print $langs->trans("CompanyHasNoAbsoluteDiscount"); } print '
'.$langs->trans('Source').''; $html->selectSourcesCommande('','source_id',1); print '
Modèle
'.$langs->trans("Model").''; // pdf include_once(DOL_DOCUMENT_ROOT.'/includes/modules/commande/modules_commande.php'); @@ -635,7 +651,10 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print '
'; print ''; - print ''; + print ''; + print ''; + print ''; + print ''; for ($i = 1 ; $i <= $NBLINES ; $i++) { print ''; print ''; - print ''; + print ''; } print '
'.$langs->trans('ProductsAndServices').''.$langs->trans('Qty').''.$langs->trans('Discount').'
'.$langs->trans('ProductsAndServices').''.$langs->trans('Qty').''.$langs->trans('ReductionShort').'
'; @@ -646,7 +665,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size); print '%
%
'; @@ -669,7 +688,10 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print_titre($langs->trans('Products')); print ''; print ''; - print ''; + print ''; + print ''; + print ''; + print ''; $var=false; @@ -688,8 +710,8 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - print ''; print ''; + print ''; $i++; } } @@ -708,8 +730,8 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; - print ''; print ''; + print ''; $i++; } } @@ -825,12 +847,24 @@ else print ''; - // Sociét + // Société print ''; - print ''; print ''; + // Ligne info remises tiers + print ''; + + // Date print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -1133,7 +1167,9 @@ else * Lignes de remise */ - // Remise relative + // Réductions relatives (Remises-Ristournes-Rabbais) +/* Une réduction doit s'appliquer obligatoirement sur des lignes de factures + et non globalement $var=!$var; print ''; print ''; @@ -1187,8 +1223,10 @@ else } print ''; print ''; +*/ // Remise absolue +/* Les remises absolues doivent s'appliquer par ajout de lignes spécialisées $var=!$var; print ''; print ''; @@ -1239,6 +1277,7 @@ else } print ''; print ''; +*/ /* * Ajouter une ligne @@ -1250,7 +1289,7 @@ else print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -1273,7 +1312,7 @@ else print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -1297,7 +1336,7 @@ else print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index fcc63ac861e..c16703ba3ac 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -739,6 +739,17 @@ if ($_GET['action'] == 'create') print ''; print ''; + // Ligne info remises tiers + print ''; + // Date facture print ''; - // Réductions absolues (Remises-Ristournes-Rabbais) + // Réductions relatives (Remises-Ristournes-Rabbais) +/* Une réduction doit s'appliquer obligatoirement sur des lignes de factures + et non globalement print ''; print ''; +*/ // Réductions absolues (Remises-Ristournes-Rabbais) +/* Les remises absolues doivent s'appliquer par ajout de lignes spécialisées print ''; print ''; +*/ // Projet if ($conf->projet->enabled) @@ -857,8 +873,8 @@ if ($_GET['action'] == 'create') print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; - print ''."\n"; +// print ''."\n"; +// print ''."\n"; print ''; print ''; @@ -871,8 +887,8 @@ if ($_GET['action'] == 'create') print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; - print ''."\n"; +// print ''."\n"; +// print ''."\n"; print ''; print ''; @@ -890,8 +906,8 @@ if ($_GET['action'] == 'create') print ''."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; - print ''."\n"; +// print ''."\n"; +// print ''."\n"; print ''; print ''; @@ -905,7 +921,10 @@ if ($_GET['action'] == 'create') // Zone de choix des produits prédéfinis à la création print '
'.$langs->trans('Ref').''.$langs->trans('Product').''.$langs->trans('Price').''.$langs->trans('Discount').''.$langs->trans('Qty').'
'.$langs->trans('Price').''.$langs->trans('Qty').''.$langs->trans('Reductionshort').'
['.$objp->ref.']'.img_object($langs->trans('ShowProduct'),'product').' '.$objp->product.''.price($objp->price).''.$objp->remise_percent.'%'.$objp->qty.'
'.$objp->remise_percent.'%
 '.img_object($langs->trans('ShowProduct'),'product').' '.$objp->product.''.price($objp->price).''.$objp->remise_percent.'%'.$objp->qty.'
'.$objp->remise_percent.'%
'.$langs->trans('Company').''; + print ''; print ''.$soc->nom.'
'.$langs->trans('Info').''; + if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $aboslute_discount=$soc->getCurrentDiscount(); + print '. '; + if ($aboslute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '
'.$langs->trans('Date').''.dolibarr_print_date($commande->date,'%A %d %B %Y').''.$langs->trans('Source').' : ' . $commande->sources[$commande->source] ; @@ -1014,7 +1048,7 @@ else print ''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('Discount').''.$langs->trans('ReductionShort').''.$langs->trans('AmountHT').'  
'.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('Discount').''.$langs->trans('ReductionShort').'   %%
 %%
'.$langs->trans('Company').''.img_object($langs->trans("ShowCompany"),'company').' '.$soc->nom_url.'
'.$langs->trans('Info').''; + if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $aboslute_discount=$soc->getCurrentDiscount(); + print '. '; + if ($aboslute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '
'.$langs->trans('Date').''; $html->select_date('','','','','',"add"); @@ -754,7 +765,9 @@ if ($_GET['action'] == 'create') $html->select_types_paiements($mode_reglement_id,'mode_reglement_id'); print '
'.$langs->trans("CustomerRelativeDiscount").''; if (! $_GET['propalid'] && ! $_GET['commandeid'] && ! $_GET['contratid']) print '
'.$langs->trans("CustomerAbsoluteDiscount").''; if (! $_GET['propalid'] && ! $_GET['commandeid'] && ! $_GET['contratid']) print '
'.$langs->trans('Proposal').''.$propal->ref.'
'.$langs->trans('Order').''.$commande->ref.'
'.$langs->trans('Contract').''.$contrat->ref.'
'; - print ''; + print ''; + print ''; + print ''; + print ''; if ($conf->service->enabled) { print ''; @@ -920,7 +939,7 @@ if ($_GET['action'] == 'create') $html->select_produits('','idprod'.$i,'',$conf->produit->limit_size); print ''; print ''; - print ''; + print ''; print ''; // Si le module service est actif, on propose des dates de début et fin à la ligne if ($conf->service->enabled) @@ -942,35 +961,38 @@ if ($_GET['action'] == 'create') /* * Factures récurrentes */ - if ($_GET['propalid'] == 0 && $_GET['commandeid'] == 0 && $_GET['contratid'] == 0) + if (! $conf->global->FACTURE_DISABLE_RECUR) { - $sql = 'SELECT r.rowid, r.titre, r.amount FROM '.MAIN_DB_PREFIX.'facture_rec as r'; - $sql .= ' WHERE r.fk_soc = '.$soc->id; - if ( $db->query($sql) ) + if ($_GET['propalid'] == 0 && $_GET['commandeid'] == 0 && $_GET['contratid'] == 0) { - $num = $db->num_rows(); - $i = 0; - - if ($num > 0) + $sql = 'SELECT r.rowid, r.titre, r.amount FROM '.MAIN_DB_PREFIX.'facture_rec as r'; + $sql .= ' WHERE r.fk_soc = '.$soc->id; + if ( $db->query($sql) ) { - print ''; } - print ''; + $db->free(); + } + else + { + dolibarr_print_error($db); } - $db->free(); - } - else - { - dolibarr_print_error($db); } } - + // Bouton "Create Draft" print ''; print "
'.$langs->trans('ProductsAndServices').''.$langs->trans('Qty').''.$langs->trans('Reduction').'    
'.$langs->trans('ProductsAndServices').''.$langs->trans('Qty').''.$langs->trans('ReductionShort').'     '.$langs->trans('ServiceLimitedDuration').'
%% 
'.$langs->trans('RecurringBills').' :
'.$langs->trans('CreateFromRepeatableInvoice').' :
\n"; @@ -990,7 +1012,7 @@ if ($_GET['action'] == 'create') print '
'.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('Reduction').'
'.$langs->trans('ReductionShort').'
'.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('Reduction').'
'.$langs->trans('ReductionShort').'
'.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('Reduction').'
'.$langs->trans('ReductionShort').'
'.$langs->trans('Info').''; + if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $aboslute_discount=$soc->getCurrentDiscount(); + print '. '; + if ($aboslute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '
'.$langs->trans('Date').''.dolibarr_print_date($fac->date,'%A %d %B %Y').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('Reduction').''.$langs->trans('ReductionShort').''.$langs->trans('AmountHT').'  '.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('Reduction').''.$langs->trans('ReductionShort').'   
'.$langs->trans('Info').''; + if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $aboslute_discount=$societe->getCurrentDiscount(); + print '. '; + if ($aboslute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print '
'.$langs->trans('Date').''; print dolibarr_print_date($propal->date,'%a %d %B %Y'); @@ -448,7 +460,9 @@ if ($_GET["propalid"] > 0) * Lignes de remise */ - // Remise relative + // Réductions relatives (Remises-Ristournes-Rabbais) +/* Une réduction doit s'appliquer obligatoirement sur des lignes de factures + et non globalement $var=!$var; print '
'; print ''; @@ -502,8 +516,10 @@ if ($_GET["propalid"] > 0) } print '
'; } diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index cc33c1d6920..0d80b4fb48f 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -36,6 +36,7 @@ if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.cl $langs->load("contracts"); $langs->load("orders"); $langs->load("companies"); +$langs->load("bills"); $user->getrights('contrat'); $user->getrights('commercial'); @@ -248,6 +249,7 @@ if ($_POST["action"] == 'updateligne' && $user->rights->contrat->creer && $_POST if ($_POST["action"] == 'updateligne' && $user->rights->contrat->creer && $_POST["cancel"]) { Header("Location: fiche.php?id=".$_GET["id"]); + exit; } if ($_GET["action"] == 'deleteline' && $user->rights->contrat->creer) @@ -259,6 +261,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->contrat->creer) if ($result == 0) { Header("Location: fiche.php?id=".$contrat->id); + exit; } } @@ -339,6 +342,17 @@ if ($_GET["action"] == 'create') // Customer print ''.$langs->trans("Customer").''.$obj->nom.''; + // Ligne info remises tiers + print ''.$langs->trans('Info').''; + if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); + else print $langs->trans("CompanyHasNoRelativeDiscount"); + $aboslute_discount=$soc->getCurrentDiscount(); + print '. '; + if ($aboslute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount); + else print $langs->trans("CompanyHasNoAbsoluteDiscount"); + print '.'; + print ''; + // Commercial suivi print ''.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").''; print ''; - print ''; + print ''; + print ''; print '%'; print ''; print '
'; @@ -868,7 +896,7 @@ else print ''; print ''; - print '%'; + print '%'; print ''; print ''."\n"; @@ -899,7 +927,7 @@ else print ''; print ''; print ''; - print '%'; + print '%'; print ''; print ''."\n"; diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 68eca56fc3f..ac4a75e37f6 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -118,6 +118,7 @@ RepeatableInvoices=Repeatable invoices Repeatable=Repeatable ChangeIntoRepeatableInvoice=Change into repeatable CreateRepeatableInvoice=Create repeatable invoice +CreateFromRepeatableInvoice=Create from repeatable invoice ExportDataset_invoice_1=Customer invoices list and invoices' lines ProformaBill=Proforma Bill: Reduction=Reduction diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 06affbcc2e3..6341ab45e11 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -118,6 +118,7 @@ RepeatableInvoices=Factures r Repeatable=Récurrente ChangeIntoRepeatableInvoice=Modifier en récurrente CreateRepeatableInvoice=Créer facture récurrente +CreateFromRepeatableInvoice=Créer depuis facture récurrente ExportDataset_invoice_1=Factures clients et lignes de facture ProformaBill=Facture Proforma : Reduction=Réduction diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index c171fef0082..60fbd7bcf0e 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -73,15 +73,16 @@ CustomerCard=Fiche Client Customer=Client CustomerDiscount=Remise client CustomerRelativeDiscount=Remise globale relative -CustomerAbsoluteDiscount=Remise globale absolue +CustomerAbsoluteDiscount=Remise globale fixe CustomerRelativeDiscountShort=Remise relative -CustomerAbsoluteDiscountShort=Remise absolue +CustomerAbsoluteDiscountShort=Remise fixe CompanyHasRelativeDiscount=Ce client a une remise par défaut de %s%% CompanyHasNoRelativeDiscount=Ce client n'a pas de remises par défaut CompanyHasAbsoluteDiscount=Ce client a %s %s de remises disponibles -CompanyHasNoAbsoluteDiscount=Ce client n'a pas ou plus de remise disponibles +CompanyHasNoAbsoluteDiscount=Ce client n'a pas ou plus de remises fixes disponibles CustomerAbsoluteDiscountAllUsers=Remises en cours (accordées par tout utilisateur) CustomerAbsoluteDiscountMy=Remises en cours (accordées personnellement) +DefaultDiscount=Remise par défaut DiscountNone=Aucune Supplier=Fournisseur CompanyList=Liste des sociétés