';
print ''.img_object($langs->trans("Preview"),'propal').'';
diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php
index 3ea883f802b..4489efb5198 100644
--- a/htdocs/commande/commande.class.php
+++ b/htdocs/commande/commande.class.php
@@ -977,7 +977,7 @@ class Commande extends CommonObject
{
$this->lignes = array();
$sql = 'SELECT l.rowid, l.fk_product, l.fk_commande, l.description, l.price, l.qty, l.tva_tx,';
- $sql.= ' l.remise_percent, l.subprice, l.rang, l.coef, l.label,';
+ $sql.= ' l.remise_percent, l.subprice, l.coef, l.rang, l.info_bits, l.label,';
$sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type';
$sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)';
@@ -1008,6 +1008,7 @@ class Commande extends CommonObject
$ligne->fk_product = $objp->fk_product;
$ligne->coef = $objp->coef;
$ligne->rang = $objp->rang;
+ $ligne->info_bits = $objp->info_bits;
$ligne->ref = $objp->product_ref;
$ligne->libelle = $objp->label; // Label produit
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index ceda4f7eacc..30140897089 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -380,7 +380,11 @@ if ($_POST['action'] == 'add')
$lines[$i]->qty,
$lines[$i]->tva_tx,
$lines[$i]->fk_product,
- $lines[$i]->remise_percent);
+ $lines[$i]->remise_percent,
+ '',
+ '',
+ 0,
+ $lines[$i]->info_bits);
}
}
else
diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php
index 8b1afb3d95a..bc452e5c505 100644
--- a/htdocs/contrat/contrat.class.php
+++ b/htdocs/contrat/contrat.class.php
@@ -336,6 +336,7 @@ class Contrat extends CommonObject
// Selectionne les lignes contrats liées à un produit
$sql = "SELECT p.rowid, p.label, p.description as product_desc, p.ref,";
$sql.= " d.description, d.statut, d.price_ht, d.tva_tx, d.qty, d.remise_percent, d.subprice,";
+ $sql.= " d.info_bits,";
$sql.= " d.date_ouverture_prevue, d.date_ouverture,";
$sql.= " d.date_fin_validite, d.date_cloture";
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as d, ".MAIN_DB_PREFIX."product as p";
@@ -354,17 +355,18 @@ class Contrat extends CommonObject
$ligne = new ContratLigne();
$ligne->id = $objp->rowid;
- $ligne->desc = stripslashes($objp->description); // Description ligne
- $ligne->libelle = stripslashes($objp->label); // Label produit
- $ligne->product_desc = stripslashes($objp->product_desc); // Description produit
+ $ligne->desc = $objp->description; // Description ligne
+ $ligne->libelle = $objp->label; // Label produit
+ $ligne->product_desc = $objp->product_desc; // Description produit
$ligne->qty = $objp->qty;
$ligne->ref = $objp->ref;
$ligne->tva_tx = $objp->tva_tx;
$ligne->subprice = $objp->subprice;
- $ligne->statut = $objp->statut;
+ $ligne->statut = $objp->statut;
$ligne->remise_percent = $objp->remise_percent;
$ligne->price = $objp->price;
$ligne->fk_product = $objp->rowid;
+ $ligne->info_bits = $objp->info_bits;
$ligne->date_debut_prevue = $objp->date_ouverture_prevue;
$ligne->date_debut_reel = $objp->date_ouverture;
diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php
index cd0e3501973..eee094e9b3c 100644
--- a/htdocs/facture.class.php
+++ b/htdocs/facture.class.php
@@ -1096,15 +1096,16 @@ class Facture extends CommonObject
* \param date_start Date de debut de validité du service
* \param date_end Date de fin de validité du service
* \param ventil Code de ventilation comptable
+ * \param info_bits Bits de type de lignes
* \remarks Les parametres sont deja censé etre juste et avec valeurs finales a l'appel
* de cette methode. Aussi, pour le taux tva, il doit deja avoir ete défini
* par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,taux_produit)
* et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
*/
- function addline($facid, $desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil = 0)
+ function addline($facid, $desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='')
{
global $conf;
- dolibarr_syslog("facture.class.php::addline($facid,$desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil)");
+ dolibarr_syslog("facture.class.php::addline($facid,$desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits)");
include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php');
if ($this->brouillon)
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 009da645652..8e39741aced 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -67,16 +67,19 @@ class Form
\param htmltooltip Contenu html du tooltip
\param direction 1=Le picto est après, -1=le picto est avant
\param usehelpcursor 1=Utilise curseur help, 0=Curseur par defaut
+ \param string Code html du texte.picto
*/
function textwithhelp($text,$htmltext,$direction=1,$usehelpcursor=1)
{
global $conf;
+
if (! $htmltext)
{
- print $text;
- return 1;
+ return $text;
}
+ $s="";
+
// Sanitize tooltip
$paramfortooltip ='';
if ($conf->use_javascript)
@@ -86,19 +89,19 @@ class Form
$paramfortooltip.=' onMouseout="hidetip()"';
}
- print '
';
+ $s.='
';
if ($direction > 0)
{
- if ($text) print '
'.$text.'
';
- print '
'.img_help($usehelpcursor,0).'
';
+ if ($text) $s.='
'.$text.'
';
+ $s.='
'.img_help($usehelpcursor,0).'
';
}
else
{
- print '
'.img_help($usehelpcursor,0).'
';
- if ($text) print '
'.$text.'
';
+ $s.='
'.img_help($usehelpcursor,0).'
';
+ if ($text) $s.='
'.$text.'
';
}
- print '
';
- return 1;
+ $s.='
';
+ return $s;
}
@@ -1518,19 +1521,22 @@ class Form
{
print '
';
print '
';
- print '
'.$formquestion['text'].'
';
+ print '
'.$formquestion['text'].'
';
foreach ($formquestion as $key => $input)
{
- if ($input['type'] == 'text') print '
'.$input['label'].'
';
+ if ($input['type'] == 'text') print '
'.$input['label'].'
';
if ($input['type'] == 'radio')
{
$i=0;
foreach($input['values'] as $selkey => $selval)
{
print '
';
- if ($i==0) print '
'.$input['label'].'
';
+ if ($i==0) print '
'.$input['label'].'
';
else print '
';
- print '
'.$selval.'
';
+ print '
';
+ print '
';
+ print $selval;
+ print '
';
$i++;
}
}
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index db0693b2074..a50c0b784e7 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -86,7 +86,7 @@ ConfirmValidateBill=Are you sure you want to validate this invoice with referenc
ConfirmClassifyPayedBill=Are you sure you want to change invoice %s to status payed ?
ConfirmCancelBill=Are you sure you want to cancel invoice %s ?
ConfirmClassifyPayedPartially=Are you sure you want to change invoice %s to status payed ?
-ConfirmClassifyPayedPartiallyquestion=This invoice has not been payed completely. What are reasons for you to close this invoice ?
+ConfirmClassifyPayedPartiallyQuestion=This invoice has not been payed completely. What are reasons for you to close this invoice ?
ConfirmClassifyPayedPartiallyReasonEscompte=Remainder to pay (%s %s) is a discount granted because payment was made before term
ConfirmClassifyPayedPartiallyReasonOther=Other
ValidateBill=Validate invoice
diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang
index 15f3b3f131b..93eb3674578 100644
--- a/htdocs/langs/fr_FR/bills.lang
+++ b/htdocs/langs/fr_FR/bills.lang
@@ -86,9 +86,14 @@ ConfirmValidateBill=
ConfirmClassifyPayedBill=Êtes-vous sûr de vouloir classer la facture %s comme payée ?
ConfirmCancelBill=Êtes-vous sûr de vouloir annuler la facture %s ?
ConfirmClassifyPayedPartially=Êtes-vous sûr de vouloir classer la facture %s comme payée ?
-ConfirmClassifyPayedPartiallyQuestion=Cette facture n'a pas été payée complètement. Pour quelle raison voulez-vous la classer magré tout ?
-ConfirmClassifyPayedPartiallyReasonEscompte=Le reste à payer (%s %s) est un escompte accordé pour motif de paiement avant échéance
+ConfirmClassifyPayedPartiallyQuestion=Cette facture n'a pas été payée à hauteur du montant initial. Pour quelle raison voulez-vous la classer magré tout ?
+ConfirmClassifyPayedPartiallyReasonDiscountNoVat=Le reste à payer (%s %s) est un escompte accordé après facture. J'accepte de perdre la TVA sur cet escompte.
+ConfirmClassifyPayedPartiallyReasonDiscountVat=Le reste à payer (%s %s) est un escompte accordé après facture. Je récupère la TVA sur cet escompte sans avoir.
+ConfirmClassifyPayedPartiallyReasonDiscountAvoir=Le reste à payer (%s %s) est un escompte accordé après facture. Je régularise la TVA par un avoir.
ConfirmClassifyPayedPartiallyReasonOther=Autre
+ConfirmClassifyPayedPartiallyNoVat=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: « escompte net de taxe »)
+ConfirmClassifyPayedPartiallyVat=Ce choix est possible si votre facture était munie de la mention adéquate. (Exemple: «seule la taxe correspondant au prix effectivement payé ouvre droit à déduction»)
+ConfirmClassifyPayedPartiallyAvoir=Ce choix est le choix à prendre si les autres ne sont pas applicables
ValidateBill=Valider facture
NumberOfBills=Nb de factures
NumberOfBillsByMonth=Nb de factures par mois
diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php
index 33b61a9af25..60b6e717e11 100644
--- a/htdocs/propal.class.php
+++ b/htdocs/propal.class.php
@@ -828,7 +828,7 @@ class Propal extends CommonObject
* Lignes propales liées à un produit ou non
*/
$sql = "SELECT d.description, d.price, d.tva_tx, d.qty, d.remise_percent, d.subprice, d.fk_product,";
- $sql.= " d.total_ht, d.total_tva, d.total_ttc, d.coef, d.rang,";
+ $sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_ttc, d.coef, d.rang,";
$sql.= " p.ref, p.label, p.description as product_desc";
$sql.= " FROM ".MAIN_DB_PREFIX."propaldet as d";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid";
@@ -854,6 +854,7 @@ class Propal extends CommonObject
$ligne->remise_percent = $objp->remise_percent;
$ligne->price = $objp->price;
+ $ligne->info_bits = $objp->info_bits;
$ligne->total_ht = $objp->total_ht;
$ligne->total_tva = $objp->total_tva;
$ligne->total_ttc = $objp->total_ttc;
diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php
index abe29a44f1c..86ed8f758b4 100644
--- a/htdocs/theme/eldy/eldy.css.php
+++ b/htdocs/theme/eldy/eldy.css.php
@@ -881,7 +881,7 @@ padding: 2px;
#dhtmltooltip
{
position: absolute;
-width: 200px;
+width: 300px;
border: 1px solid #444444;
padding: 2px;
background-color: lightyellow;
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index d8436cf55db..39900f3199c 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -27,8 +27,9 @@ alter table llx_contrat add column note_public text after note;
alter table llx_facture add column note_public text after note;
alter table llx_facture add column remise_absolue real DEFAULT 0 after remise_percent;
-alter table llx_facture add column close_code varchar(12) after remise;
+alter table llx_facture add column close_code varchar(16) after remise;
alter table llx_facture add column close_note varchar(128) after close_code;
+alter table llx_facture modify close_code varchar(16);
alter table llx_propal add column note_public text after note;
alter table llx_propal add column remise_absolue real DEFAULT 0 after remise_percent;
diff --git a/mysql/tables/llx_facture.sql b/mysql/tables/llx_facture.sql
index 1968c67bcd4..e27ad86b09b 100644
--- a/mysql/tables/llx_facture.sql
+++ b/mysql/tables/llx_facture.sql
@@ -36,7 +36,7 @@ create table llx_facture
remise_absolue real DEFAULT 0, -- remise absolue
remise real DEFAULT 0, -- remise totale calculee
- close_code varchar(12), -- Code motif cloture sans paiement complet
+ close_code varchar(16), -- Code motif cloture sans paiement complet
close_note varchar(128), -- Commentaire cloture sans paiement complet
tva real DEFAULT 0, -- montant tva apres remise totale