2
0
forked from Wavyzz/dolibarr

Fix: When creating invoice from other object, discount are created

automatically
This commit is contained in:
Laurent Destailleur
2011-09-10 17:52:21 +00:00
parent 74f9c13a79
commit 605355c89c
32 changed files with 531 additions and 469 deletions

View File

@@ -1,6 +1,6 @@
<?PHP
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,11 +30,11 @@ $langs->load("companies");
$langs->load("orders");
$langs->load("bills");
$_socid = GETPOST("id");
$socid = GETPOST("id");
// Security check
if ($user->societe_id > 0)
{
$_socid = $user->societe_id;
$socid = $user->societe_id;
}
@@ -55,10 +55,18 @@ if (GETPOST("action") == 'setremise')
$result=$soc->set_remise_client($_POST["remise"],$_POST["note"],$user);
if ($result > 0)
{
if (GETPOST('backtopage'))
{
Header("Location: ".GETPOST('backtopage'));
exit;
}
else
{
Header("Location: remise.php?id=".$_GET["id"]);
exit;
}
}
else
{
$errmesg=$soc->error;
@@ -80,21 +88,15 @@ llxHeader();
* Mode fiche
*
*********************************************************************************/
if ($_socid > 0)
if ($socid > 0)
{
// On recupere les donnees societes par l'objet
$objsoc = new Societe($db);
$objsoc->id=$_socid;
$objsoc->fetch($_socid,$to);
$objsoc->id=$socid;
$objsoc->fetch($socid);
if ($errmesg)
{
print '<div class="error">'.$errmesg.'</div><br>';
}
dol_htmloutput_errors($errmesg);
/*
* Affichage onglets
*/
$head = societe_prepare_head($objsoc);
dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company');

View File

@@ -33,10 +33,10 @@ $langs->load("bills");
$langs->load("companies");
// Security check
$_socid = GETPOST("id");
$socid = GETPOST("id");
if ($user->societe_id > 0)
{
$_socid = $user->societe_id;
$socid = $user->societe_id;
}
@@ -204,16 +204,16 @@ if (GETPOST("action") == 'confirm_remove' && GETPOST("confirm")=='yes')
$form=new Form($db);
$facturestatic=new Facture($db);
llxHeader();
llxHeader('',$langs->trans("GlobalDiscount"));
if ($_socid > 0)
if ($socid > 0)
{
dol_htmloutput_mesg($mesg);
// On recupere les donnees societes par l'objet
$objsoc = new Societe($db);
$objsoc->id=$_socid;
$objsoc->fetch($_socid,$to);
$objsoc->id=$socid;
$objsoc->fetch($socid);
/*
* Affichage onglets
@@ -256,10 +256,10 @@ if ($_socid > 0)
}
print '<tr><td width="38%">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
print '<td>'.$remise_all.'&nbsp;'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
print '<td>'.$remise_all.'&nbsp;'.$langs->trans("Currency".$conf->monnaie).' '.$langs->trans("HT").'</td></tr>';
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
print '<td>'.$remise_user.'&nbsp;'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
print '<td>'.$remise_user.'&nbsp;'.$langs->trans("Currency".$conf->monnaie).' '.$langs->trans("HT").'</td></tr>';
print '</table>';
print '<br>';
@@ -269,7 +269,7 @@ if ($_socid > 0)
print '<td><input type="text" size="5" name="amount_ht" value="'.$_POST["amount_ht"].'">&nbsp;'.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
print '<td>';
print $form->load_tva('tva_tx','0','',$mysoc,'');
print $form->load_tva('tva_tx',GETPOST('tva_tx'),'',$mysoc,'');
print '</td></tr>';
print '<tr><td>'.$langs->trans("NoteReason").'</td>';
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';

View File

@@ -709,14 +709,33 @@ if ($action == 'add' && $user->rights->facture->creer)
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();
$fk_parent_line=0;
$num=sizeof($lines);
$num=count($lines);
for ($i=0;$i<$num;$i++)
{
if ($lines[$i]->subprice < 0)
{
// Negative line, we create a discount line
// TODO
$discount = new DiscountAbsolute($db);
$discount->fk_soc=$object->socid;
$discount->amount_ht=abs($lines[$i]->total_ht);
$discount->amount_tva=abs($lines[$i]->total_tva);
$discount->amount_ttc=abs($lines[$i]->total_ttc);
$discount->tva_tx=$lines[$i]->tva_tx;
$discount->fk_user=$user->id;
$discount->description=$desc;
$discountid=$discount->create($user);
if ($discountid > 0)
{
$result=$object->insert_discount($discountid);
//$result=$discount->link_to_invoice($lineid,$id);
}
else
{
$mesg=$discount->error;
$error++;
break;
}
}
else
{
@@ -766,8 +785,13 @@ if ($action == 'add' && $user->rights->facture->creer)
$fk_parent_line
);
if ($result < 0)
if ($result > 0)
{
$lineid=$result;
}
else
{
$lineid=0;
$error++;
break;
}
@@ -1659,9 +1683,12 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="2">';
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",'<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$soc->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid')).'">'.$soc->remise_client.'</a>');
else print $langs->trans("CompanyHasNoRelativeDiscount");
print ' <a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$soc->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid')).'">('.$langs->trans("EditRelativeDiscount").')</a>';
print '. ';
print '<br>';
if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",'<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$soc->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid')).'">'.price($absolute_discount).'</a>',$langs->trans("Currency".$conf->monnaie));
else print $langs->trans("CompanyHasNoAbsoluteDiscount");
print ' <a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$soc->id.'&action='.$action.'&origin='.GETPOST('origin').'&originid='.GETPOST('originid')).'">('.$langs->trans("EditGlobalDiscounts").')</a>';
print '.';
print '</td></tr>';
@@ -2127,13 +2154,15 @@ else
print '</td></tr>';
// Relative and absolute discounts
$addabsolutediscount=' <a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddGlobalDiscount").'</a>';
$addrelativediscount='<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("EditRelativeDiscounts").'</a>';
$addabsolutediscount='<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("EditGlobalDiscounts").'</a>';
$addcreditnote='<a href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&socid='.$soc->id.'&type=2&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddCreditNote").'</a>';
print '<tr><td>'.$langs->trans('Discounts');
print '</td><td colspan="5">';
if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client);
else print $langs->trans("CompanyHasNoRelativeDiscount");
//print ' ('.$addrelativediscount.')';
if ($absolute_discount > 0)
{
@@ -2165,14 +2194,14 @@ else
// Remise dispo de type remise fixe (not credit note)
$filter='fk_facture_source IS NULL';
print '<br>';
$html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer, ' - '.$addabsolutediscount);
$html->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id',$soc->id, $absolute_discount, $filter, $resteapayer, ' ('.$addabsolutediscount.')');
}
}
else
{
if ($absolute_creditnote > 0) // If not linke will be added later
{
if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' - '.$addabsolutediscount.'<br>';
if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')<br>';
else print '.';
}
else print '. ';
@@ -2203,7 +2232,7 @@ else
if (! $absolute_discount && ! $absolute_creditnote)
{
print $langs->trans("CompanyHasNoAbsoluteDiscount");
if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' - '.$addabsolutediscount.'<br>';
if ($object->statut == 0 && $object->type != 2 && $object->type != 3) print ' ('.$addabsolutediscount.')<br>';
else print '. ';
}
/*if ($object->statut == 0 && $object->type != 2 && $object->type != 3)

View File

@@ -621,6 +621,9 @@ class Facture extends CommonObject
$line->desc = $object->lines[$i]->desc;
$line->price = $object->lines[$i]->price;
$line->subprice = $object->lines[$i]->subprice;
$line->total_ht = $object->lines[$i]->total_ht;
$line->total_tva = $object->lines[$i]->total_tva;
$line->total_ttc = $object->lines[$i]->total_ttc;
$line->tva_tx = $object->lines[$i]->tva_tx;
$line->localtax1_tx = $object->lines[$i]->localtax1_tx;
$line->localtax2_tx = $object->lines[$i]->localtax2_tx;
@@ -634,11 +637,6 @@ class Facture extends CommonObject
$line->special_code = $object->lines[$i]->special_code;
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;
// TODO it's ok ?
$line->total_ht = $object->lines[$i]->total_ht;
$line->total_tva = $object->lines[$i]->total_tva;
$line->total_ttc = $object->lines[$i]->total_ttc;
$this->lines[$i] = $line;
}
@@ -1057,10 +1055,10 @@ class Facture extends CommonObject
/**
* Ajout en base d'une ligne remise fixe en ligne de facture
* Add a discount line into invoice using an existing absolute discount
*
* @param idremise Id de la remise fixe
* @return int >0 si ok, <0 si ko
* @param int $idremise Id of absolute discount
* @return int >0 if OK, <0 if KO
*/
function insert_discount($idremise)
{
@@ -1781,30 +1779,31 @@ class Facture extends CommonObject
/**
* Add an invoice line into database (linked to product/service or not)
* \param facid Id de la facture
* \param desc Description de la ligne
* \param pu_ht Prix unitaire HT (> 0 even for credit note)
* \param qty Quantite
* \param txtva Taux de tva force, sinon -1
* \param txlocaltax1 Local tax 1 rate
* \param txlocaltax2 Local tax 2 rate
* \param fk_product Id du produit/service predefini
* \param remise_percent Pourcentage de remise de la ligne
* \param date_start Date de debut de validite du service
* \param date_end Date de fin de validite du service
* \param ventil Code de ventilation comptable
* \param info_bits Bits de type de lignes
* \param fk_remise_except Id remise
* \param price_base_type HT or TTC
* \param pu_ttc Prix unitaire TTC (> 0 even for credit note)
* \param type Type of line (0=product, 1=service)
* \param rang Position of line
* \return int >0 if OK, <0 if KO
* \remarks Les parametres sont deja cense etre juste et avec valeurs finales a l'appel
* Add an invoice line into database (linked to product/service or not).
* Les parametres sont deja cense etre juste et avec valeurs finales a l'appel
* de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini
* par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit)
* et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
*
* @param facid Id de la facture
* @param desc Description de la ligne
* @param pu_ht Prix unitaire HT (> 0 even for credit note)
* @param qty Quantite
* @param txtva Taux de tva force, sinon -1
* @param txlocaltax1 Local tax 1 rate
* @param txlocaltax2 Local tax 2 rate
* @param fk_product Id du produit/service predefini
* @param remise_percent Pourcentage de remise de la ligne
* @param date_start Date de debut de validite du service
* @param date_end Date de fin de validite du service
* @param ventil Code de ventilation comptable
* @param info_bits Bits de type de lignes
* @param fk_remise_except Id remise
* @param price_base_type HT or TTC
* @param pu_ttc Prix unitaire TTC (> 0 even for credit note)
* @param type Type of line (0=product, 1=service)
* @param rang Position of line
* @return int <0 if KO, Id of line if OK
*/
function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0)
{

View File

@@ -784,7 +784,8 @@ abstract class CommonObject
/**
* Stocke un numero de rang pour toutes les lignes de detail d'un element qui n'en ont pas.
*
* @param renum true to renum all already ordered lines, false to renum only not already ordered lines.
* @param boolean $renum true to renum all already ordered lines, false to renum only not already ordered lines.
* @param string $rowidorder ASC or DESC
*/
function line_order($renum=false, $rowidorder='ASC')
{
@@ -832,7 +833,7 @@ abstract class CommonObject
/**
* Update a line to have a lower rank
*
* @param $rowid
* @param int $rowid
*/
function line_up($rowid)
{
@@ -848,7 +849,7 @@ abstract class CommonObject
/**
* Update a line to have a higher rank
*
* @param $rowid
* @param int $rowid
*/
function line_down($rowid)
{
@@ -867,8 +868,8 @@ abstract class CommonObject
/**
* Update position of line (rang)
*
* @param rowid
* @param rang
* @param int $rowid
* @param int $rang
*/
function updateRangOfLine($rowid,$rang)
{
@@ -883,7 +884,7 @@ abstract class CommonObject
/**
* Update position of line with ajax (rang)
*
* @param roworder
* @param int $roworder
*/
function line_ajaxorder($roworder)
{
@@ -899,8 +900,8 @@ abstract class CommonObject
/**
* Update position of line up (rang)
*
* @param rowid
* @param rang
* @param int $rowid
* @param int $rang
*/
function updateLineUp($rowid,$rang)
{
@@ -928,9 +929,9 @@ abstract class CommonObject
/**
* Update position of line down (rang)
*
* @param rowid
* @param rang
* @param max
* @param int $rowid
* @param int $rang
* @param int $max
*/
function updateLineDown($rowid,$rang,$max)
{
@@ -958,7 +959,7 @@ abstract class CommonObject
/**
* Get position of line (rang)
*
* @param rowid Id of line
* @param int $rowid Id of line
* @return int Value of rang in table of lines
*/
function getRangOfLine($rowid)
@@ -976,6 +977,7 @@ abstract class CommonObject
/**
* Get rowid of the line relative to its position
*
* @param int $rang Rang value
* @return int Rowid of the line
*/
function getIdOfLine($rang)
@@ -994,7 +996,7 @@ abstract class CommonObject
/**
* Get max value used for position of line (rang)
*
* @param fk_parent_line
* @param int $fk_parent_line Parent line id
* @return int Max value of rang in table of lines
*/
function line_max($fk_parent_line=0)
@@ -1033,7 +1035,7 @@ abstract class CommonObject
/**
* Update private note of element
*
* @param note New value for note
* @param string $note New value for note
* @return int <0 if KO, >0 if OK
*/
function update_note($note)

View File

@@ -33,6 +33,7 @@ class DiscountAbsolute
var $error;
var $id; // Id remise
var $fk_soc;
var $amount_ht; //
var $amount_tva; //
var $amount_ttc; //
@@ -122,9 +123,10 @@ class DiscountAbsolute
/**
* \brief Create in database
* \param user User that create
* \return int <0 si ko, >0 si ok
* Create a discount into database
*
* @param User $user User that create
* @return int <0 if KO, >0 if OK
*/
function create($user)
{
@@ -171,10 +173,11 @@ class DiscountAbsolute
}
/*
* \brief Delete object in database. If fk_facture_source is defined, we delete all familiy with same fk_facture_source. If not, only with id is removed.
* \param user Object of user asking to delete
* \return int <0 if KO, >0 if OK
/**
* Delete object in database. If fk_facture_source is defined, we delete all familiy with same fk_facture_source. If not, only with id is removed
*
* @param User $user Object of user asking to delete
* @return int <0 if KO, >0 if OK
*/
function delete($user)
{
@@ -259,10 +262,11 @@ class DiscountAbsolute
/**
* \brief Link the discount to a particular invoice line or a particular invoice
* \param rowidline Invoice line id
* \param rowidinvoice Invoice id
* \return int <0 ko, >0 ok
* Link the discount to a particular invoice line or a particular invoice
*
* @param int $rowidline Invoice line id
* @param int $rowidinvoice Invoice id
* @return int <0 if KO, >0 if OK
*/
function link_to_invoice($rowidline,$rowidinvoice)
{
@@ -287,6 +291,8 @@ class DiscountAbsolute
$resql = $this->db->query($sql);
if ($resql)
{
$this->fk_facture_source=$rowidline;
$this->fk_facture=$rowidinvoice;
return 1;
}
else

View File

@@ -23,7 +23,6 @@
* \ingroup ficheinter
* \brief Fichier de la classe des gestion des fiches interventions
*/
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
@@ -61,7 +60,8 @@ class Fichinter extends CommonObject
/**
* Class constructor
* @param DB Data base handler access
*
* @param DoliDB $DB Data base handler access
*/
function Fichinter($DB)
{

View File

@@ -221,6 +221,7 @@ NewGlobalDiscount=تحديد خصم جديد
NewRelativeDiscount=خصم جديد النسبية
NoteReason=ملاحظة / السبب
ReasonDiscount=السبب
AddDiscount=إضافة الخصم
AddGlobalDiscount=إضافة الخصم
DiscountOfferedBy=التي تمنحها
DiscountStillRemaining=خصم لا يزالون

View File

@@ -234,6 +234,7 @@ GlobalDiscount=Descompte fixe
CreditNote=Abonament
CreditNotes=Abonaments
AddDiscount=Crear descompte fix
AddGlobalDiscount=Crear descompte fixe
AddCreditNote=Crear factura de pagament
Deposit=Bestreta
Deposits=Bestretes
@@ -245,7 +246,6 @@ NewGlobalDiscount=Nou descompte fixe
NewRelativeDiscount=Nou descompte
NoteReason=Nota/Motiu
ReasonDiscount=Motiu
AddGlobalDiscount=Afegir descompte fixe
DiscountOfferedBy=Acordat per
DiscountStillRemaining=Descomptes fixes pendents
DiscountAlreadyCounted=Descomptes fixes ja aplicats

View File

@@ -219,6 +219,7 @@ DiscountFromCreditNote=Discount fra kreditnota %s
NewGlobalDiscount=Ny discount
NoteReason=Bemærk / Grund
ReasonDiscount=Årsag
AddDiscount=Tilføj rabat
AddGlobalDiscount=Tilføj rabat
DiscountOfferedBy=Ydet af
DiscountStillRemaining=Discount stadig resterende

View File

@@ -215,6 +215,7 @@ DiscountFromCreditNote=Rabatt aus Gutschrift %s
NewGlobalDiscount=Neue Rabattregel
NoteReason=Anmerkung/Begründung
ReasonDiscount=Rabattgrund
AddDiscount=Rabattregel hinzufügen
AddGlobalDiscount=Rabattregel hinzufügen
DiscountOfferedBy=Rabatt angeboten von
DiscountStillRemaining=Noch verbleibender Rabatt

View File

@@ -215,6 +215,7 @@ DiscountFromCreditNote=Rabatt aus Gutschrift %s
NewGlobalDiscount=Neue Rabattregel
NoteReason=Anmerkung/Begründung
ReasonDiscount=Rabattgrund
AddDiscount=Rabattregel hinzufügen
AddGlobalDiscount=Rabattregel hinzufügen
DiscountOfferedBy=Rabatt angeboten von
DiscountStillRemaining=Noch verbleibender Rabatt

View File

@@ -244,7 +244,6 @@ NewGlobalDiscount=Νέα απόλυτη έκπτωση
NewRelativeDiscount=Νέα σχετική έκπτωση
NoteReason=Σημείωση/Αιτία
ReasonDiscount=Αιτία
AddGlobalDiscount=Προσθήκη έκπτωσης
DiscountOfferedBy=Granted by
DiscountStillRemaining=Η έκπτωση παραμένει
DiscountAlreadyCounted=Η έκπτωση υπολογίστηκε ήδη
@@ -426,6 +425,7 @@ DisabledBecauseNotErasable=Άτομα με ειδικές ανάγκες, επε
NumberOfBillsByMonth=Nb των τιμολογίων ανά μήνα
AmountOfBillsByMonthHT=Ποσό των τιμολογίων ανά μήνα (μετά από φόρους)
AddDiscount=Δημιουργία απόλυτη έκπτωση
AddGlobalDiscount=Προσθήκη έκπτωσης
AddCreditNote=Δημιουργία πιστωτικό σημείωμα
InvoiceNotChecked=Δεν έχει επιλεγεί τιμολόγιο
ShowUnpaidAll=Εμφάνιση όλων των απλήρωτων τιμολογίων

View File

@@ -232,7 +232,11 @@ Reductions=Reductions
ReductionsShort=Reduc.
Discount=Discount
Discounts=Discounts
AddDiscount=Create absolute discount
AddDiscount=Create discount
AddRelativeDiscount=Create relative discount
EditRelativelDiscount=Edit relatvie discount
AddGlobalDiscount=Create absolute discount
EditGlobalDiscounts=Edit absolute discounts
AddCreditNote=Create credit note
ShowDiscount=Show discount
RelativeDiscount=Relative discount
@@ -249,7 +253,6 @@ NewGlobalDiscount=New absolute discount
NewRelativeDiscount=New relative discount
NoteReason=Note/Reason
ReasonDiscount=Reason
AddGlobalDiscount=Add discount
DiscountOfferedBy=Granted by
DiscountStillRemaining=Discounts still remaining
DiscountAlreadyCounted=Discounts already counted

View File

@@ -234,6 +234,7 @@ GlobalDiscount=Descuento fijo
CreditNote=Abono
CreditNotes=Abonos
AddDiscount=Crear descuento fijo
AddGlobalDiscount=Crear descuento fijo
AddCreditNote=Crear factura de abono
Deposit=Anticipo
Deposits=Anticipos
@@ -245,7 +246,6 @@ NewGlobalDiscount=Nuevo descuento fijo
NewRelativeDiscount=Nuevo descuento
NoteReason=Nota/Motivo
ReasonDiscount=Motivo
AddGlobalDiscount=Añadir descuento fijo
DiscountOfferedBy=Acordado por
DiscountStillRemaining=Descuentos fijos pendientes
DiscountAlreadyCounted=Descuentos fijos ya aplicados

View File

@@ -221,6 +221,7 @@ NewGlobalDiscount=تحديد خصم جديد
NewRelativeDiscount=خصم جديد النسبية
NoteReason=ملاحظة / السبب
ReasonDiscount=السبب
AddDiscount=إضافة الخصم
AddGlobalDiscount=إضافة الخصم
DiscountOfferedBy=التي تمنحها
DiscountStillRemaining=خصم لا يزالون

View File

@@ -215,6 +215,7 @@ DiscountFromCreditNote=Alennus menoilmoitus %s
NewGlobalDiscount=Uusi edullisista
NoteReason=Huomautus / syy
ReasonDiscount=Perustelu
AddDiscount=Lisää edullisista
AddGlobalDiscount=Lisää edullisista
DiscountOfferedBy=Myöntämä
DiscountStillRemaining=Discount vielä jäljellä

View File

@@ -233,7 +233,11 @@ RelativeDiscount=Remise relative
GlobalDiscount=Remise fixe
CreditNote=Avoir
CreditNotes=Avoirs
AddDiscount=Créer remise fixe
AddDiscount=Editer remises
AddRelativeDiscount=Créer remise relative
EditRelativeDiscount=Editer remise relative
AddGlobalDiscount=Créer remise fixe
EditGlobalDiscounts=Editer remises fixes
AddCreditNote=Créer facture avoir
Deposit=Acompte
Deposits=Acomptes
@@ -245,7 +249,6 @@ NewGlobalDiscount=Nouvelle remise fixe
NewRelativeDiscount=Nouvelle remise relative
NoteReason=Note/Motif
ReasonDiscount=Motif
AddGlobalDiscount=Ajouter remise fixe
DiscountOfferedBy=Accordé par
DiscountStillRemaining=Remises restant en cours
DiscountAlreadyCounted=Remises déjà appliquées

View File

@@ -219,7 +219,6 @@ DiscountFromCreditNote =Sconto da nota di credito per %s
NewGlobalDiscount =Nuovo sconto
NoteReason =Note / Motivo
ReasonDiscount =Motivo
AddGlobalDiscount =Aggiungi sconto
DiscountOfferedBy =Concessi da
DiscountStillRemaining =Sconto ancora disponibile
DiscountAlreadyCounted =Sconto già applicato
@@ -436,7 +435,8 @@ BillsSuppliersUnpaidForCompany=Fornitore di fatture non pagate per %s
BillsLate=Ritardi nei pagamenti
DisabledBecauseNotErasable=Disabili perché non possono essere cancellati
AmountOfBillsByMonthHT=Importo delle fatture per mese (al netto delle imposte)
AddDiscount=Creare sconto assoluto
AddDiscount=Creare sconto
AddGlobalDiscount=Creare sconto assoluto
AddCreditNote=Crea nota di credito
InvoiceNotChecked=Fattura non selezionati
ShowUnpaidAll=Mostra tutte le fatture non pagate

View File

@@ -223,6 +223,7 @@ DiscountFromCreditNote=Rabatt fra kreditnota %s
NewGlobalDiscount=Ny rabatt
NoteReason=Notat/Årsak
ReasonDiscount=Årsak
AddDiscount=Legg til rabatt
AddGlobalDiscount=Legg til rabatt
DiscountOfferedBy=Innrømmet av
DiscountStillRemaining=Gjenstående rabatt

View File

@@ -188,6 +188,7 @@ CreditNotes=Creditnota's
NewGlobalDiscount=Nieuwe korting
NoteReason=Nota/Reden
ReasonDiscount=Reden
AddDiscount=Korting toevoegen
AddGlobalDiscount=Korting toevoegen
DiscountOfferedBy=Verleend door
DiscountStillRemaining=Korting nog steeds geldig / nog niet gerekend

View File

@@ -240,6 +240,7 @@ NewGlobalDiscount=Nieuwe korting
NewRelativeDiscount=Nieuwe relatieve korting
NoteReason=Opmerking/Reden
ReasonDiscount=Reden
AddDiscount=Toevoegen korting
AddGlobalDiscount=Toevoegen korting
DiscountOfferedBy=Verleend door
DiscountStillRemaining=Kortingen nog steeds vast

View File

@@ -220,6 +220,7 @@ DiscountFromCreditNote=Rabat od kredytu pamiętać %s
NewGlobalDiscount=Nowe zniżki
NoteReason=Uwaga / Reason
ReasonDiscount=Powód
AddDiscount=Dodaj zniżki
AddGlobalDiscount=Dodaj zniżki
DiscountOfferedBy=Przyznane przez
DiscountStillRemaining=Rabat nadal pozostały

View File

@@ -242,6 +242,7 @@ CreditNoteDepositUse=O projeto deve ser validado para utilizar este tipo de cré
NewGlobalDiscount=Novo Desconto fixo
NoteReason=Nota/Motivo
ReasonDiscount=Motivo
AddDiscount=Adicionar Desconto
AddGlobalDiscount=Adicionar Desconto Fixo
DiscountOfferedBy=Acordado por
DiscountStillRemaining=Descontos fixos Pendentes

View File

@@ -232,6 +232,7 @@ DiscountFromDeposit=Pagamentos a partir de depósito na factura %s
NewGlobalDiscount=Novo Desconto fixo
NoteReason=Nota/Motivo
ReasonDiscount=Motivo
AddDiscount=Adicionar Desconto
AddGlobalDiscount=Adicionar Desconto fixo
DiscountOfferedBy=Acordado por
DiscountStillRemaining=Descontos fixos Pendentes

View File

@@ -217,6 +217,7 @@ DiscountFromCreditNote=Reducere de la nota de credit %s
NewGlobalDiscount=Noua reducere
NoteReason=Notă / Motiv
ReasonDiscount=Motiv
AddDiscount=Adauga discount
AddGlobalDiscount=Adauga discount
DiscountOfferedBy=Acordate de către
DiscountStillRemaining=Reducere rămânând

View File

@@ -216,7 +216,6 @@ DiscountFromCreditNote=Скидка из кредитового авизо %s
NewGlobalDiscount=Новая фиксированная скидка
NoteReason=Примечание / Основание
ReasonDiscount=Основание
AddGlobalDiscount=Добавить скидку
DiscountOfferedBy=Предоставлена
DiscountStillRemaining=Остаток скидки
DiscountAlreadyCounted=Скидка уже рассчитана
@@ -418,6 +417,7 @@ ShowUnpaidAll=Показать все неоплаченные счета-фак
NumberOfBillsByMonth=Кол-во счетов-фактур по месяцам
AmountOfBillsByMonthHT=Сумма счетов-фактур за месяц (за вычетом налога)
AddDiscount=Создать абсолютную скидку
AddGlobalDiscount=Добавить скидку
AddCreditNote=Создать кредитовое авизо
ClosePaidInvoicesAutomatically=Классифицировать как 'Оплачен' все полностью оплаченные счета-фактуры.
AllCompletelyPayedInvoiceWillBeClosed=Все счета, без остатка к оплате будут автоматически закрыты со статусом "Оплачен".

View File

@@ -247,6 +247,7 @@ NewGlobalDiscount=Nov fiksni popust
NewRelativeDiscount=Nov relativni popust
NoteReason=Opomba/Razlog
ReasonDiscount=Razlog
AddDiscount=Dodaj popust
AddGlobalDiscount=Dodaj popust
DiscountOfferedBy=Odobril
DiscountStillRemaining=Popust še vedno ostaja

View File

@@ -252,6 +252,7 @@ NewGlobalDiscount=Ny fix rabatt
NewRelativeDiscount=Nya relativa rabatt
NoteReason=Not / Reason
ReasonDiscount=Reason
AddDiscount=Lägg rabatt
AddGlobalDiscount=Lägg rabatt
DiscountOfferedBy=Beviljats av
DiscountStillRemaining=Rabatt återstår fortfarande

View File

@@ -253,6 +253,7 @@ NewGlobalDiscount=Yeni düzeltme indirim
NewRelativeDiscount=Yeni göreli indirim
NoteReason=Not / Nedeni
ReasonDiscount=Neden
AddDiscount=Indirimli ekle
AddGlobalDiscount=Indirimli ekle
DiscountOfferedBy=Tarafından verilen
DiscountStillRemaining=Indirimli hareketsiz kalan

View File

@@ -251,6 +251,7 @@ NewGlobalDiscount=新的修补程序折扣
NewRelativeDiscount=新的相对折扣
NoteReason=备注/原因
ReasonDiscount=原因
AddDiscount=添加折扣
AddGlobalDiscount=添加折扣
DiscountOfferedBy=获
DiscountStillRemaining=折扣尚存

View File

@@ -1625,7 +1625,8 @@ function img_object($alt, $picto, $options='', $pictoisfullpath=0)
* Show picto whatever it's its name (generic function)
*
* @param alt Text on alt and title of image
* @param picto Name of image file to show (If no extension provided, we use '.png'). Image must be stored into img directory.
* @param picto Name of image file to show ('filenew', ...)
* If no extension provided, we use '.png'. Image must be stored into theme/xxx/img directory.
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)