From d9183a681da29e17f675f1b9bc183aacd40634ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 May 2009 19:45:18 +0000 Subject: [PATCH] Better management of social contribution New: Can edit label and date for period even if payed --- htdocs/chargesociales.class.php | 79 ++++++++-------- htdocs/compta/charges/index.php | 53 ++++++++--- htdocs/compta/sociales/charges.php | 142 ++++++++++++++++------------- htdocs/compta/sociales/index.php | 27 ++++-- htdocs/langs/en_US/bills.lang | 2 + htdocs/langs/en_US/main.lang | 1 + htdocs/langs/fr_FR/bills.lang | 2 + htdocs/langs/fr_FR/main.lang | 1 + 8 files changed, 180 insertions(+), 127 deletions(-) diff --git a/htdocs/chargesociales.class.php b/htdocs/chargesociales.class.php index 5e3313fa660..0cb8b5f0d8e 100644 --- a/htdocs/chargesociales.class.php +++ b/htdocs/chargesociales.class.php @@ -29,7 +29,7 @@ require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php"); /** \class ChargeSociales \brief Classe permettant la gestion des paiements des charges - La tva collectée n'est calculée que sur les factures payées. + La tva collect�e n'est calcul�e que sur les factures pay�es. */ class ChargeSociales extends CommonObject { @@ -37,7 +37,7 @@ class ChargeSociales extends CommonObject var $error; var $element='rowid'; var $table_element='chargesociales'; - + var $id; var $date_ech; var $lib; @@ -77,6 +77,7 @@ class ChargeSociales extends CommonObject $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; + $this->ref = $obj->rowid; $this->date_ech = $obj->date_ech; $this->lib = $obj->lib; $this->type = $obj->fk_type; @@ -102,30 +103,30 @@ class ChargeSociales extends CommonObject /** - * \brief Crée une charge sociale - * \param user Utilisateur qui crée - * \return int <0 si KO, id charge créée si OK + * \brief Create a social contribution in database + * \param user User making creation + * \return int <0 if KO, id if OK */ function create($user) { // Nettoyage parametres $newamount=price2num($this->amount,'MT'); - + // Validation parametres if (! $newamount > 0) { $this->error="ErrorBadParameter"; return -2; } - + $this->db->begin(); - + $sql = "INSERT INTO ".MAIN_DB_PREFIX."chargesociales (fk_type, libelle, date_ech, periode, amount)"; $sql.= " VALUES (".$this->type.",'".addslashes($this->lib)."',"; - $sql.= " '".$this->db->idate($this->date_ech)."','".$this->periode."',"; + $sql.= " '".$this->db->idate($this->date_ech)."','".$this->db->idate($this->periode)."',"; $sql.= " ".price2num($newamount); $sql.= ")"; - + dol_syslog("ChargesSociales::create sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -142,12 +143,12 @@ class ChargeSociales extends CommonObject $this->db->rollback(); return -1; } - } + } + - /** * \brief Efface un charge sociale - * \param user Utilisateur qui crée le paiement + * \param user Utilisateur qui cr�e le paiement * \return int <0 si erreur, >0 si ok */ function delete($user) @@ -166,7 +167,7 @@ class ChargeSociales extends CommonObject return -1; } } - + /** * \brief Met a jour une charge sociale @@ -176,13 +177,13 @@ class ChargeSociales extends CommonObject function update($user) { $this->db->begin(); - + $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales"; $sql.= " SET libelle='".addslashes($this->lib)."',"; $sql.= " date_ech='".$this->db->idate($this->date_ech)."',"; - $sql.= " periode='".$this->periode."'"; + $sql.= " periode='".$this->db->idate($this->periode)."'"; $sql.= " WHERE rowid=".$this->id; - + dol_syslog("ChargesSociales::update sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -196,9 +197,9 @@ class ChargeSociales extends CommonObject $this->db->rollback(); return -1; } - } - - + } + + function solde($year = 0) { $sql = "SELECT sum(f.amount) as amount"; @@ -227,7 +228,7 @@ class ChargeSociales extends CommonObject } /** - * \brief Tag la charge comme payée complètement + * \brief Tag la charge comme pay�e compl�tement * \param rowid id de la ligne a modifier */ function set_payed($rowid) @@ -237,8 +238,8 @@ class ChargeSociales extends CommonObject } /** - * \brief Retourne le libellé du statut d'une charge (impayé, payée) - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long + * \brief Retourne le libell� du statut d'une charge (impay�, pay�e) + * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long * \return string Libelle */ function getLibStatut($mode=0) @@ -247,10 +248,10 @@ class ChargeSociales extends CommonObject } /** - * \brief Renvoi le libellé d'un statut donné + * \brief Renvoi le libell� d'un statut donn� * \param statut Id statut - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto - * \return string Libellé du statut + * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� court + Picto + * \return string Libell� du statut */ function LibStatut($statut,$mode=0) { @@ -301,9 +302,9 @@ class ChargeSociales extends CommonObject function getNomUrl($withpicto=0,$maxlen=0) { global $langs; - + $result=''; - + $lien = ''; $lienfin=''; @@ -348,7 +349,7 @@ class ChargeSociales extends CommonObject class PaiementCharge { var $db; - + var $id; var $chid; var $paiementtype; @@ -357,7 +358,7 @@ class PaiementCharge var $num_paiement; var $note; - + function PaiementCharge($DB) { $this->db = $DB; @@ -366,8 +367,8 @@ class PaiementCharge /** * \brief Creation d'un paiement de charge sociale dans la base - * \param user Utilisateur qui crée le paiement - * \return int <0 si KO, id du paiement crée si OK + * \param user Utilisateur qui cr�e le paiement + * \return int <0 si KO, id du paiement cr�e si OK */ function create($user) { @@ -380,9 +381,9 @@ class PaiementCharge $this->error='ErrorBadValueForParameters'; return -1; } - + $this->db->begin(); - + $total=0; foreach ($this->amounts as $key => $value) { @@ -393,7 +394,7 @@ class PaiementCharge if ($total > 0) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount,"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiementcharge (fk_charge, datec, datep, amount,"; $sql.= " fk_typepaiement, num_paiement, note, fk_user_creat, fk_bank)"; $sql.= " VALUES ($this->chid, ".$this->db->idate(mktime()).", "; $sql.= $this->db->idate($this->datepaye).", "; @@ -429,18 +430,18 @@ class PaiementCharge } /** - * \brief Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank générée + * \brief Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank g�n�r�e * \param id_bank Id de la banque * \return int >0 si OK, <=0 si KO */ function update_fk_bank($id_bank) { $sql = "UPDATE llx_paiementcharge set fk_bank = ".$id_bank." where rowid = ".$this->id; - + dol_syslog("PaiementCharge::update_fk_bank sql=".$sql); $result = $this->db->query($sql); - if ($result) - { + if ($result) + { return 1; } else diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index eac313ea74c..9e0289a4fa5 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -27,6 +27,7 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php"); +require_once(DOL_DOCUMENT_ROOT."/chargesociales.class.php"); $langs->load("compta"); @@ -48,6 +49,7 @@ llxHeader('',$langs->trans("TaxAndDividendsArea")); print_fiche_titre($langs->trans("TaxAndDividendsArea"),($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":"")); +print $langs->trans("DescTaxAndDividendsArea").'
'; print "
"; @@ -56,29 +58,31 @@ print "
"; print_titre($langs->trans("SocialContributions")); print ''; print ""; +print ''; +print ''; print ""; -print ""; print ""; +print ""; print ""; print "\n"; -$sql = "SELECT c.id, c.libelle as lib, s.fk_type as type,"; -$sql.=" count(s.rowid) as nb, sum(s.amount) as total, sum(pc.amount) as totalpaye"; -$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; -$sql.= ", ".MAIN_DB_PREFIX."chargesociales as s"; +$sql = "SELECT c.id, c.libelle as lib, s.rowid, s.libelle, s.fk_type as type, s.periode, s.date_ech,"; +$sql.= " count(s.rowid) as nb, sum(s.amount) as total, sum(pc.amount) as totalpaye"; +$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; +$sql.= " ".MAIN_DB_PREFIX."chargesociales as s"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = s.rowid"; $sql.= " WHERE s.fk_type = c.id"; $sql.= " AND s.entity = ".$conf->entity; if ($year > 0) { $sql .= " AND ("; - // Si period renseigné on l'utilise comme critere de date, sinon on prend date échéance, - // ceci afin d'etre compatible avec les cas ou la période n'etait pas obligatoire + // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance, + // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire $sql .= " (s.periode is not null and date_format(s.periode, '%Y') = $year) "; $sql .= "or (s.periode is null and date_format(s.date_ech, '%Y') = $year)"; $sql .= ")"; } -$sql.= " GROUP BY c.id, c.libelle, s.fk_type"; +$sql.= " GROUP BY c.id, c.libelle, s.rowid, s.fk_type, s.periode, s.date_ech"; $sql.= " ORDER BY c.libelle ASC"; dol_syslog("compta/charges/index.php: select payment sql=".$sql); @@ -88,6 +92,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; $total = 0; + $totalnb = 0; $totalpaye = 0; $var=true; @@ -96,17 +101,28 @@ if ($resql) $obj = $db->fetch_object($resql); $var = !$var; print ""; + $date=$obj->periode; + if (empty($date)) $date=$obj->date_ech; + print ''; + print ''; print ''; - print ''; print ''; + print ''; print ''; print ''; $total = $total + $obj->total; + $totalnb = $totalnb + $obj->nb; $totalpaye = $totalpaye + $obj->totalpaye; $i++; } - print ''; + print ''; print '"; + print ''; print '"; print ""; } @@ -132,8 +148,8 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $sql.= " WHERE f.entity = ".$conf->entity; if ($year > 0) { - // Si period renseigné on l'utilise comme critere de date, sinon on prend date échéance, - // ceci afin d'etre compatible avec les cas ou la période n'etait pas obligatoire + // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance, + // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire $sql.= " AND date_format(f.datev, '%Y') = ".$year; } $sql.= " ORDER BY dm DESC"; @@ -146,9 +162,11 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $total = 0 ; print '
'.$langs->trans("PeriodEndDate").''.$langs->trans("Label").'".$langs->trans("Type")."".$langs->trans("Nb")."".$langs->trans("Amount")."".$langs->trans("NbOfPayments")."".$langs->trans("AlreadyPayed")."
'.dol_print_date($date,'day').''; + $socialcontrib=new ChargeSociales($db); + $socialcontrib->id=$obj->rowid; + $socialcontrib->lib=$obj->libelle; + print $socialcontrib->getNomUrl(1,'16'); + print ''.$obj->lib.''.$obj->nb.''.price($obj->total).''.$obj->nb.''.price($obj->totalpaye).'
'.$langs->trans("Total").'
'.$langs->trans("Total").''.price($total)."'.$totalnb.''.price($totalpaye)."
'; print ''; - print ''; + print ''; print ""; print '"; + print '"; + print ""; print "\n"; $var=1; while ($i < $num) @@ -156,17 +174,22 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') $obj = $db->fetch_object($result); $var=!$var; print ""; - print '\n"; + print ''."\n"; print "\n"; $total = $total + $obj->amount; + print ""; + print '\n"; print ""; print "\n"; $i++; } print ''; - print '"; + print '"; + print ''; + print '"; + print ""; print "
'.$langs->trans("Date").''.$langs->trans("PeriodEndDate").'".$langs->trans("Label")."'.$langs->trans("Amount")."'.$langs->trans("DatePayment")."".$langs->trans("AlreadyPayed")."
'.dol_print_date($obj->dm,'day')."'.dol_print_date($obj->dm,'day').' ? ".$obj->label."".price($obj->amount)."'.dol_print_date($obj->dm,'day')."".price($obj->amount)."
'.$langs->trans("Total").''.price($total)."
'.price($total)." '.price($total)."
"; $db->free($result); diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index c286fb36b46..2f1784e83af 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -50,42 +50,28 @@ $result = restrictedArea($user, 'tax', '', '', 'charges'); /* * Classer paye */ -if ($_POST["action"] == 'confirm_payed') +if ($_REQUEST["action"] == 'confirm_payed' && $_REQUEST["confirm"] == 'yes') { - if ($_POST["confirm"] == 'yes') - { - $chargesociales = new ChargeSociales($db); - $result = $chargesociales->set_payed($chid); - } - else - { - $_GET["action"]=''; - } + $chargesociales = new ChargeSociales($db); + $result = $chargesociales->set_payed($chid); } /* * Suppression d'une charge sociale */ -if ($_POST["action"] == 'confirm_delete') +if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes') { - if ($_POST["confirm"] == 'yes') + $chargesociales=new ChargeSociales($db); + $chargesociales->id=$_GET["id"]; + $result=$chargesociales->delete($user); + if ($result > 0) { - $chargesociales=new ChargeSociales($db); - $chargesociales->id=$_GET["id"]; - $result=$chargesociales->delete($user); - if ($result > 0) - { - Header("Location: index.php"); - exit; - } - else - { - $mesg='
'.$chargesociales->error.'
'; - } + Header("Location: index.php"); + exit; } else { - $_GET['action']=''; + $mesg='
'.$chargesociales->error.'
'; } } @@ -97,12 +83,13 @@ if ($_POST["action"] == 'confirm_delete') if ($_POST["action"] == 'add' && $user->rights->tax->charges->creer) { $dateech=@dol_mktime($_POST["echhour"],$_POST["echmin"],$_POST["echsec"],$_POST["echmonth"],$_POST["echday"],$_POST["echyear"]); + $dateperiod=@dol_mktime($_POST["periodhour"],$_POST["periodmin"],$_POST["periodsec"],$_POST["periodmonth"],$_POST["periodday"],$_POST["periodyear"]); if (! $dateech) { $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DateDue")).'
'; $_GET["action"] = 'create'; } - elseif (! $_POST["period"]) + elseif (! $dateperiod) { $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Period")).'
'; $_GET["action"] = 'create'; @@ -119,7 +106,7 @@ if ($_POST["action"] == 'add' && $user->rights->tax->charges->creer) $chargesociales->type=$_POST["actioncode"]; $chargesociales->lib=$_POST["label"]; $chargesociales->date_ech=$dateech; - $chargesociales->periode=$_POST["period"]; + $chargesociales->periode=$dateperiod; $chargesociales->amount=$_POST["amount"]; $chid=$chargesociales->create($user); @@ -138,12 +125,13 @@ if ($_POST["action"] == 'add' && $user->rights->tax->charges->creer) if ($_GET["action"] == 'update' && ! $_POST["cancel"] && $user->rights->tax->charges->creer) { $dateech=@dol_mktime($_POST["echhour"],$_POST["echmin"],$_POST["echsec"],$_POST["echmonth"],$_POST["echday"],$_POST["echyear"]); + $dateperiod=@dol_mktime($_POST["periodhour"],$_POST["periodmin"],$_POST["periodsec"],$_POST["periodmonth"],$_POST["periodday"],$_POST["periodyear"]); if (! $dateech) { $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DateDue")).'
'; $_GET["action"] = 'edit'; } - elseif (! $_POST["period"]) + elseif (! $dateperiod) { $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Period")).'
'; $_GET["action"] = 'edit'; @@ -155,7 +143,7 @@ if ($_GET["action"] == 'update' && ! $_POST["cancel"] && $user->rights->tax->cha $chargesociales->lib=$_POST["label"]; $chargesociales->date_ech=$dateech; - $chargesociales->periode=$_POST["period"]; + $chargesociales->periode=$dateperiod; $result=$chargesociales->update($user); if ($result > 0) @@ -169,6 +157,12 @@ if ($_GET["action"] == 'update' && ! $_POST["cancel"] && $user->rights->tax->cha } } + + +/* + * View + */ + llxHeader(); $html = new Form($db); @@ -186,7 +180,7 @@ if ($_GET["action"] == 'create') $var=false; - print '
'; + print ''; print ''; print ""; @@ -194,35 +188,43 @@ if ($_GET["action"] == 'create') print ''; print "\n"; print ''; + print ''; - print ''; - print ''; - - print ''; + // Label print ''; + // Type + print ''; + + // Date end period + print ''; + print ''; + print ''; + print ''; print ''; @@ -277,23 +279,40 @@ if ($chid > 0) print '
'; print ' '; print ''; - print $langs->trans("DateDue"); - print ''; - print $langs->trans("Period"); + print $langs->trans("Label"); print ''; print $langs->trans("Type"); - print ''; - print $langs->trans("Label"); + print ''; + print $langs->trans("PeriodEndDate"); print ''; print $langs->trans("Amount"); print ''; + print $langs->trans("DateDue"); + print ''; print ' '; print '
 '; - print $html->select_date('-1', 'ech', 0, 0, 0, 'charge', 1); - print '
YYYYMMDD
'; - $html->select_type_socialcontrib(); - print ''; + $html->select_type_socialcontrib(isset($_POST["actioncode"])?$_POST["actioncode"]:'','actioncode',1); + print ''; + print $html->select_date(! empty($dateperiod)?$dateperiod:'-1', 'period', 0, 0, 0, 'charge', 1); + print ''; + print $html->select_date(! empty($dateech)?$dateech:'-1', 'ech', 0, 0, 0, 'charge', 1); + print '
'; - print ""; + // Ref + print ""; - print ""; - - print ""; - print "'; } else { - print dol_print_date($cha->periode,"%Y"); + print ''; + } + + // Type + print ""; + + // Period en date + print ""; + print ""; - print '"; - if ($cha->paye==0 && $_GET['action'] == 'edit') + // Due date + if ($_GET['action'] == 'edit') { - print ''; print '"; } else { - print ''; print ""; } print ''; @@ -391,12 +407,12 @@ if ($chid > 0) /* * Boutons actions */ - if (! $_GET["action"] || $_GET["action"] == 'update') + if ($_GET["action"] != 'edit') { print "
\n"; - // Editer - if ($cha->paye == 0 && $user->rights->tax->charges->creer) + // Edit + if ($user->rights->tax->charges->creer) { print "id&action=edit\">".$langs->trans("Modify").""; } @@ -407,13 +423,13 @@ if ($chid > 0) print "id&action=create\">".$langs->trans("DoPayment").""; } - // Classer 'payé' + // Classify 'payed' if ($cha->paye == 0 && round($resteapayer) <=0 && $user->rights->tax->charges->creer) { print "id&action=payed\">".$langs->trans("ClassifyPayed").""; } - // Supprimer + // Delete if ($cha->paye == 0 && $totalpaye <=0 && $user->rights->tax->charges->supprimer) { print "id&action=delete\">".$langs->trans("Delete").""; @@ -424,7 +440,7 @@ if ($chid > 0) } else { - /* Charge non trouvé */ + /* Charge non trouv� */ dol_print_error('',$cha->error); } } diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 0f2d0ae044d..01d61f6c426 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -147,22 +147,24 @@ if ($resql) print "
"; print_liste_field_titre($langs->trans("Ref"),"index.php","id","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateDue"),"index.php","de","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Period"),"index.php","periode","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),"index.php","type","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),"index.php","s.libelle","",$param,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),"index.php","type","",$param,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PeriodEndDate"),"index.php","periode","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Amount"),"index.php","s.amount","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateDue"),"index.php","de","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),"index.php","s.paye","",$param,'align="right"',$sortfield,$sortorder); print "\n"; print ""; print ''; print ''; - print ''; + // Type print ''; + // Period end date print ''; + print ''; print ''; print '"; + // Ref print ''; - print ''; + // Label + print ''; + // Type + print ''; + + // Date end period print ''; - print ''; - - print ''; - print ''; + // Due date + print ''; + print ''; print ''; diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 82a10407bd2..b2876c8faaa 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -266,6 +266,8 @@ WatermarkOnDraftBill=Watermark on draft invoices (nothing if empty) CloneInvoice=Clone invoice ConfirmCloneInvoice=Are you sure you want to clone this invoice %s ? DisabledBecauseReplacedInvoice=Action disabled because invoice has been replaced +DescTaxAndDividendsArea=This area presents a summary of all payments made for tax or social contributions. Only records with payment during the fixed year are included here. +NbOfPayments=Nb of payments # PaymentConditions PaymentConditionShortRECEP=Immediate diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f9a52f24958..831553d4eba 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -78,6 +78,7 @@ Always=Always Never=Never Under=under Period=Period +PeriodEndDate=End date for period Activate=Activate Activated=Activated Closed=Closed diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index c7f2d717e9d..2aa7bc36965 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -266,6 +266,8 @@ InvoiceNotChecked=Aucune facture n'a été sélectionnée CloneInvoice=Cloner facture ConfirmCloneInvoice=Etes-vous sur de vouloir cloner cette facture %s ? DisabledBecauseReplacedInvoice=Action désactivée car facture remplacée +DescTaxAndDividendsArea=Cet écran résumé la liste de toutes les taxes et charges sociales sociales exigées pour une année donnée. La date prise en compte est la période d'exigibilité. +NbOfPayments=Nb de payements # PaymentConditions PaymentConditionShortRECEP=A réception diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index b49d4d04d93..78da5dc784a 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -77,6 +77,7 @@ Always=Toujours Never=Jamais Under=sous Period=Période +PeriodEndDate=Date fin période Activate=Activer Activated=Activé Closed=Clôturé
".$langs->trans("Ref").''.$cha->id."
".$langs->trans("Ref").''; + print $html->showrefnav($cha,'id'); + print "
".$langs->trans("Type")."$cha->type_libelle".$langs->trans("Payments")."
".$langs->trans("Period").""; - if ($cha->paye==0 && $_GET['action'] == 'edit') + // Label + if ($_GET['action'] == 'edit') { - print "periode,"%Y%m%d")."\"> (YYYYMMDD)"; + print '
'.$langs->trans("Label").''; + print ''; + print '
'.$langs->trans("Label").''.$cha->lib.'
".$langs->trans("Type")."$cha->type_libelle".$langs->trans("Payments")."
".$langs->trans("PeriodEndDate").""; + if ($_GET['action'] == 'edit') + { + print $html->select_date($cha->periode, 'period', 0, 0, 0, 'charge', 1); + } + else + { + print dol_print_date($cha->periode,"day"); } print "'; + print ''; /* * Paiements @@ -355,17 +374,14 @@ if ($chid > 0) print "
'.$langs->trans("Label").''; - print ''; - print '
'.$langs->trans("DateDue").""; print $html->select_date($cha->date_ech, 'ech', 0, 0, 0, 'charge', 1); print "
'.$langs->trans("Label").''.$cha->lib.'
".$langs->trans("DateDue")."".dol_print_date($cha->date_ech,'day')."
'.$langs->trans("AmountTTC").''.price($cha->amount).'
   '; $html->select_type_socialcontrib($typeid,'typeid',1,16,0); print '   '; print ''; @@ -176,16 +178,22 @@ if ($resql) $var = !$var; print "
'; print ''.img_file().' '.$obj->id.''; print ''.dol_print_date($obj->de, 'day').''.dol_trunc($obj->libelle,42).''.dol_trunc($obj->type_lib,16).''; if ($obj->periode) { - print 'periode).'">'.strftime("%Y",$obj->periode).''; + print 'periode).'">'.dol_print_date($obj->periode,'day').''; } else { @@ -193,12 +201,11 @@ if ($resql) } print ''.dol_trunc($obj->type_lib,16).''.dol_trunc($obj->libelle,42).''.price($obj->amount).''.dol_print_date($obj->de, 'day').''.$chargesociale_static->LibStatut($obj->paye,5).'