diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index cccbd837b79..0bc85e0cd29 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -117,7 +117,7 @@ if ($_socid > 0) */ $head = societe_prepare_head($objsoc); - dol_fiche_head($head, 'absolutediscount', $objsoc->nom); + dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty")); print '
'; @@ -125,6 +125,12 @@ if ($_socid > 0) print ''; + // Name + print ''; + print ''; + // Calcul avoirs en cours $remise_all=$remise_user=0; $sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user"; @@ -191,12 +197,14 @@ if ($_socid > 0) { print_titre($langs->trans("DiscountStillRemaining")); print '
'.$langs->trans('Name').''; + print $form->showrefnav($objsoc,'id','',1,'rowid','nom'); + print '
'; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -209,33 +217,38 @@ if ($_socid > 0) $var = !$var; print ""; print ''; - print ''; } elseif ($obj->description == '(DEPOSIT)') { + print ''; } else { + print ''; } - print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; - if ($obj->user_id == $user->id) print ''; + if ($obj->user_id == $user->id) print ''; else print ''; print ''; $i++; @@ -251,8 +264,9 @@ if ($_socid > 0) print '
'; /* - * Liste ristournes appliqu�es (=liees a une ligne de facture ou facture) + * Liste ristournes appliquees (=liees a une ligne de facture ou facture) */ + // Remises liees a lignes de factures $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; $sql.= $db->pdate("rc.datec")." as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; @@ -295,13 +309,14 @@ if ($_socid > 0) { print_titre($langs->trans("DiscountAlreadyCounted")); print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").'
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("DiscountOfferedBy").''.$langs->trans("DiscountOfferedBy").' 
'.dol_print_date($obj->dc,'dayhour').''; if ($obj->description == '(CREDIT_NOTE)') { + print ''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1); + print ''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; print $langs->trans("InvoiceDeposit").' '.$facturestatic->getNomURl(1); + print ''; print $obj->description; + print ''.price($obj->amount_ht).''.$langs->trans("NotConsumed").''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; - print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print 'rowid.'">'.img_delete($langs->trans("RemoveDiscount")).'rowid.'">'.img_delete($langs->trans("RemoveDiscount")).' 
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -335,32 +350,36 @@ if ($_socid > 0) $var = !$var; print ""; print ''; - print ''; } elseif ($obj->description == '(DEPOSIT)') { + print ''; } else { + print ''; } - print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 885b8d705bc..eb18aa19651 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2156,10 +2156,11 @@ else } if ($fac->type == 2) { - $facreplaced=new Facture($db); - $facreplaced->fetch($fac->fk_facture_source); - print ' ('.$langs->transnoentities("CorrectInvoice",$facreplaced->getNomUrl(1)).')'; + $facusing=new Facture($db); + $facusing->fetch($fac->fk_facture_source); + print ' ('.$langs->transnoentities("CorrectInvoice",$facusing->getNomUrl(1)).')'; } + $facidavoir=$fac->getListIdAvoirFromInvoice(); if (sizeof($facidavoir) > 0) { @@ -2192,7 +2193,15 @@ else { if ($fac->statut > 0 || $fac->type == 2 || $fac->type == 3) { - print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie)).'. '; + if ($fac->statut == 0) + { + print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie)).'. '; + } + else + { + $text=$langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie)); + print $html->textwithhelp($text,$langs->trans("AbsoluteDiscountUse")); + } } else { @@ -2207,8 +2216,12 @@ else // If validated, we show link "add credit note to payment" if ($fac->statut != 1 || $fac->type == 2 || $fac->type == 3) { - $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)); - print $html->textwithhelp($text,$langs->trans("CreditNoteDepositUse")); + if ($fac->statut == 0 && $fac->type != 3) + { + $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)); + print $html->textwithhelp($text,$langs->trans("CreditNoteDepositUse")); + } + else print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'.'; } else { @@ -2254,9 +2267,89 @@ else print ''; + + $resteapayeraffiche=$resteapayer; + + // Loop on each credit note or deposit amount applied + $creditnoteamount=0; + $depositamount=0; + $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; + $sql.= " re.description, re.fk_facture_source, re.fk_facture_source"; + $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; + $sql.= " WHERE fk_facture = ".$fac->id; + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + $invoice=new Facture($db); + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $invoice->fetch($obj->fk_facture_source); + print ''; + print ''; + print ''; + $i++; + if ($invoice->type == 2) $creditnoteamount += $obj->amount_ttc; + if ($invoice->type == 3) $depositamount += $obj->amount_ttc; + } + } + else + { + dol_print_error($db); + } + + // Payé partiellement 'escompte' + if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'discount_vat') + { + print ''; + $resteapayeraffiche=0; + } + // Payé partiellement ou Abandon 'badcustomer' + if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'badcustomer') + { + print ''; + //$resteapayeraffiche=0; + } + // Payé partiellement ou Abandon 'product_returned' + if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'product_returned') + { + print ''; + $resteapayeraffiche=0; + } + // Payé partiellement ou Abandon 'abandon' + if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'abandon') + { + print ''; + $resteapayeraffiche=0; + } + + // Billed + print ''; + + // Remainder to pay + print ''; + print ''; + print ''; + } + else + { + // Sold credit note + print ''; + print ''; + } + + print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("Invoice").'
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").''.$langs->trans("AmountTTC").''.$langs->trans("Author").''.$langs->trans("Author").' 
'.dol_print_date($obj->dc,'dayhour').''; if ($obj->description == '(CREDIT_NOTE)') { + print ''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1); + print ''; $facturestatic->id=$obj->fk_facture_source; $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; print $langs->trans("InvoiceDeposit").' '.$facturestatic->getNomURl(1); + print ''; print $obj->description; + print ''.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.''.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.''.price($obj->amount_ht).''.price2num($obj->tva_tx,'MU').'%'.price($obj->amount_ttc).''; - print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login; + print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ' 
'; + print ''; + + // List of payments already done + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $var=true; + /* * List of payments */ + + // Payments already done (from deposits) + /* + $depositamount=0; + $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; + $sql.= " re.description, re.fk_facture_source, re.fk_facture_source"; + $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; + $sql.= " WHERE fk_facture = ".$fac->id; + $resql=$db->query($sql); + if ($resql) + { + $numdeposits = $db->num_rows($resql); + $i = 0; + $invoice=new Facture($db); + // Loop on each deposit applied + while ($i < $numdeposits) + { + $objinvoice = $db->fetch_object($resql); + $invoice->fetch($objinvoice->fk_facture_source); + if ($invoice->type != 3) continue; // only deposits + + // For each deposits, get payments + $sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,'; + $sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p, '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf'; + $sql.= ' WHERE pf.fk_facture = '.$invoice->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid'; + $sql.= ' ORDER BY dp, tms'; + + $resqlpayment = $db->query($sql); + if ($resqlpayment) + { + $numpayments = $db->num_rows($resqlpayment); + $j = 0; + while ($j < $numpayments) + { + $objpayment = $db->fetch_object($resqlpayement); + $var=!$var; + + print ''; + print ''; + print ''; + // Remove deposit invoice + print ''; + print ''; + + $j++; + $depositamount += $obj->amount; + } + } + $i++; + } + } + else + { + dol_print_error($db); + } + */ + + // Payments already done (from payment on this invoice) $sql = 'SELECT '.$db->pdate('datep').' as dp, pf.amount,'; $sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p, '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf'; @@ -2268,19 +2361,9 @@ else { $num = $db->num_rows($result); $i = 0; - print '
'.($fac->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').''.$langs->trans('Amount').' 
'; + print ''.img_object($langs->trans('ShowPayment'),'payment').' '; + print dol_print_date($objpayment->dp,'day').''; + + print ' ('.$langs->trans("Deposit").' '; + print $invoice->getNomUrl(0).')'; + + print ''.$objpayment->paiement_type.' '.$objpayement->num_paiement.''.price($objpayment->amount).''; + print 'rowid.'">'.img_delete().''; + print '
'; - - // List of payments already done - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; if ($fac->type != 2) { - $var=True; while ($i < $num) { $objp = $db->fetch_object($result); @@ -2294,97 +2377,7 @@ else print ''; $i++; } - - // Already payed - print ''; - - // Billed - print ''; - $resteapayeraffiche=$resteapayer; - - $creditnoteamount=0; - - // Loop on each credit note applied - $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; - $sql.= " re.description, re.fk_facture_source, re.fk_facture_source"; - $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; - $sql.= " WHERE fk_facture = ".$fac->id; - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - $invoice=new Facture($db); - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $invoice->fetch($obj->fk_facture_source); - print ''; - print ''; - print ''; - $i++; - $creditnoteamount += $obj->amount_ttc; - } - } - else - { - dol_print_error($db); - } - - // Payé partiellement 'escompte' - if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'discount_vat') - { - print ''; - $resteapayeraffiche=0; - } - // Payé partiellement ou Abandon 'badcustomer' - if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'badcustomer') - { - print ''; - //$resteapayeraffiche=0; - } - // Payé partiellement ou Abandon 'product_returned' - if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'product_returned') - { - print ''; - $resteapayeraffiche=0; - } - // Payé partiellement ou Abandon 'abandon' - if (($fac->statut == 2 || $fac->statut == 3) && $fac->close_code == 'abandon') - { - print ''; - $resteapayeraffiche=0; - } - print ''; - print ''; - print ''; } - else - { - // Sold credit note - print ''; - print ''; - } - print '
'.($fac->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).''.$langs->trans('Type').''.$langs->trans('Amount').' 
'.$langs->trans('AlreadyPayed').' :'.price($totalpaye).' 
'.$langs->trans("Billed").' :'.price($fac->total_ttc).' 
'; - if ($invoice->type == 2) print $langs->trans("CreditNote").' '; - if ($invoice->type == 3) print $langs->trans("Deposit").' '; - print $invoice->getNomUrl(0); - print ' :'.price($obj->amount_ttc).''; - print 'rowid.'">'.img_delete().''; - print '
'; - print $html->textwithhelp($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1); - print ''.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'; - print $html->textwithhelp($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); - print ''.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'; - print $html->textwithhelp($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); - print ''.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'; - $text=$langs->trans("HelpAbandonOther"); - if ($fac->close_note) $text.='

'.$langs->trans("Reason").':'.$fac->close_note; - print $html->textwithhelp($langs->trans("Abandoned").':',$text,-1); - print '
'.price($fac->total_ttc - $creditnoteamount - $totalpaye).' 
'; - if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); - else print $langs->trans('ExcessReceived'); - print ' :'.price($resteapayeraffiche).' 
'.$langs->trans('TotalTTCToYourCredit').' :'.price(abs($fac->total_ttc)).' 
'; $db->free($result); } else @@ -2392,6 +2385,107 @@ else dol_print_error($db); } + if ($fac->type != 2) + { + // Total already payed + print '
'; + if ($fac->type != 3) print $langs->trans('AlreadyPayedNoCreditNotesNoDeposits'); + else print $langs->trans('AlreadyPayed'); + print ' :'.price($totalpaye).' 
'; + if ($invoice->type == 2) print $langs->trans("CreditNote").' '; + if ($invoice->type == 3) print $langs->trans("Deposit").' '; + print $invoice->getNomUrl(0); + print ' :'.price($obj->amount_ttc).''; + print 'rowid.'">'.img_delete().''; + print '
'; + print $html->textwithhelp($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1); + print ''.price($fac->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; + print $html->textwithhelp($langs->trans("Abandoned").':',$langs->trans("HelpAbandonBadCustomer"),-1); + print ''.price($fac->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; + print $html->textwithhelp($langs->trans("ProductReturned").':',$langs->trans("HelpAbandonProductReturned"),-1); + print ''.price($fac->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'; + $text=$langs->trans("HelpAbandonOther"); + if ($fac->close_note) $text.='

'.$langs->trans("Reason").':'.$fac->close_note; + print $html->textwithhelp($langs->trans("Abandoned").':',$text,-1); + print '
'.price($fac->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' 
'.$langs->trans("Billed").' :'.price($fac->total_ttc).' 
'; + if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); + else print $langs->trans('ExcessReceived'); + print ' :'.price($resteapayeraffiche).' 
'.$langs->trans('TotalTTCToYourCredit').' :'.price(abs($fac->total_ttc)).' 
'; + print ''; // Date payment term @@ -2975,10 +3069,10 @@ else // Validate if ($fac->statut == 0 && $num_lignes > 0 && - ( - (($fac->type == 0 || $fac->type == 1 || $fac->type == 3 || $fac->type == 4) && $fac->total_ttc >= 0) - || ($fac->type == 2 && $fac->total_ttc <= 0)) - ) + ( + (($fac->type == 0 || $fac->type == 1 || $fac->type == 3 || $fac->type == 4) && $fac->total_ttc >= 0) + || ($fac->type == 2 && $fac->total_ttc <= 0)) + ) { if ($user->rights->facture->valider) { diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 0495fa8ca95..63ba8b5d21b 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -46,7 +46,7 @@ $mesg=''; if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->facture->paiement) { $db->begin(); - + $paiement = new Paiement($db); $paiement->fetch($_GET['id']); $result = $paiement->delete(); @@ -72,7 +72,7 @@ if ($_POST['action'] == 'confirm_valide' && $_POST['confirm'] == 'yes' && $user- if ($paiement->valide() > 0) { $db->commit(); - + // \TODO Boucler sur les facture liées à ce paiement et régénèrer le pdf $factures=array(); foreach($factures as $id) @@ -121,11 +121,11 @@ $h=0; $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$_GET["id"]; $head[$h][1] = $langs->trans("Card"); $hselected = $h; -$h++; +$h++; $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/info.php?id='.$_GET["id"]; $head[$h][1] = $langs->trans("Info"); -$h++; +$h++; dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice")); @@ -180,15 +180,15 @@ print ''.$langs->trans('Note').''.nl2b // Bank account if ($conf->banque->enabled) { - if ($paiement->bank_account) + if ($paiement->bank_account) { $bankline=new AccountLine($db); $bankline->fetch($paiement->bank_line); - + print ''; print ''.$langs->trans('BankTransactionLine').''; print ''; - print $bankline->getNomUrl(1,0,'showall'); + print $bankline->getNomUrl(1,0,'showall'); print ''; print ''; } @@ -201,15 +201,15 @@ print ''; * Liste des factures */ $allow_delete = 1 ; -$sql = 'SELECT f.facnumber, f.total_ttc, pf.amount, f.rowid as facid, f.paye, f.fk_statut, s.nom, s.rowid as socid'; +$sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.total_ttc, f.paye, f.fk_statut, pf.amount, s.nom, s.rowid as socid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE pf.fk_facture = f.rowid AND f.fk_soc = s.rowid'; $sql .= ' AND pf.fk_paiement = '.$paiement->id; -$resql=$db->query($sql); +$resql=$db->query($sql); if ($resql) { $num = $db->num_rows($resql); - + $i = 0; $total = 0; print '
'; @@ -219,11 +219,11 @@ if ($resql) print ''; print ''; print "\n"; - - if ($num > 0) + + if ($num > 0) { $var=True; - + $facturestatic=new Facture($db); while ($i < $num) @@ -231,9 +231,12 @@ if ($resql) $objp = $db->fetch_object($resql); $var=!$var; print ''; - print '\n"; + print '\n"; print ''; print ''; print ''; @@ -244,16 +247,16 @@ if ($resql) } $total = $total + $objp->amount; $i++; - } + } } $var=!$var; print "
'.$langs->trans('Company').''.$langs->trans('AmountTTC').'
'.img_object($langs->trans('ShowBill'),'bill').' '; - print $objp->facnumber; - print "'; + $facturestatic->id=$objp->facid; + $facturestatic->ref=$objp->facnumber; + $facturestatic->type=$objp->type; + print $facturestatic->getNomUrl(1); + print "'.$facturestatic->LibStatut($objp->paye,$objp->fk_statut,2,1).''.img_object($langs->trans('ShowCompany'),'company').' '.$objp->nom.''.price($objp->amount).'
\n"; - $db->free($resql); + $db->free($resql); } else { - dol_print_error($db); + dol_print_error($db); } print ''; @@ -283,7 +286,7 @@ if ($user->societe_id == 0 && $allow_delete && $_GET['action'] == '') } } -print ''; +print ''; $db->close(); diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index cf59a24312d..6f2e2ef4fbb 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -490,7 +490,7 @@ class Form /** - * \brief Retourne la liste déroulante des remises fixes + * \brief Return HTML combo list of absolute discounts * \param selected Id remise fixe pré-sélectionnée * \param htmlname Nom champ formulaire * \param filter Criteres optionnels de filtre @@ -1750,10 +1750,10 @@ class Form print ''; if ($nbqualifiedlines > 0) { - print ' trans("UseCreditNoteInInvoicePayment"); - print '">'; + else print $langs->trans("UseCredit"); + print '" title="'.$langs->trans("UseCreditNoteInInvoicePayment").'">'; } print ''; print '
'; diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index a826f43b88b..54cf03a5eb5 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -32,6 +32,9 @@ ReplacementByInvoice=Replaced by invoice CorrectInvoice=Correct invoice %s CorrectInvoice=Correct invoice %s CorrectionInvoice=Correction invoice +UsedByInvoice=Used to pay invoice %s +ConsumedBy=Consumed by +NotConsumed=Not consumed NoReplacableInvoice=No replacable invoices NoInvoiceToCorrect=No invoice to correct InvoiceHasAvoir=Corrected by one or several invoices @@ -171,6 +174,7 @@ ShowInvoiceDeposit=Show deposit invoice ShowPayment=Show payment File=File AlreadyPayed=Already payed +AlreadyPayedNoCreditNotesNoDeposits=Alreday payed (without credit notes and deposits) Abandoned=Abandoned RemainderToPay=Remainder to pay RemainderToTake=Remainder to take @@ -232,6 +236,8 @@ Deposit=Deposit Deposits=Deposits DiscountFromCreditNote=Discount from credit note %s DiscountFromDeposit=Payments from deposit invoice %s +AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation +CreditNoteDepositUse=Invoice must be validated to use this king of credits NewGlobalDiscount=New discount NoteReason=Note/Reason ReasonDiscount=Reason @@ -318,7 +324,8 @@ LawApplicationPart3=the seller until the complete cashing of LawApplicationPart4=their price. LimitedLiabilityCompanyCapital=SARL with Capital of UseDiscount=Use discount -UseCreditNoteInInvoicePayment=Reduce payment with this credit +UseCredit=Use credit +UseCreditNoteInInvoicePayment=Reduce amount to pay with this credit MenuChequeDeposits=Cheques deposits MenuCheques=Cheques MenuChequesReceipts=Cheques receipts diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index f5ad393f4fa..0828cb91903 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -32,6 +32,9 @@ ReplacedByInvoice=Remplacée par la facture %s ReplacementByInvoice=Remplacée par facture CorrectInvoice=Correction facture %s CorrectionInvoice=Correction facture +UsedByInvoice=Appliqué sur facture %s +ConsumedBy=Consommé par +NotConsumed=Non consommé NoReplacableInvoice=Pas de factures remplacables NoInvoiceToCorrect=Pas de factures à corriger InvoiceHasAvoir=Corrigée par un ou plusieurs avoirs @@ -171,6 +174,7 @@ ShowInvoiceDeposit=Afficher facture d'accompte ShowPayment=Afficher réglement File=Fichier AlreadyPayed=Déjà réglé +AlreadyPayedNoCreditNotesNoDeposits=Déjà réglé (hors avoirs et accomptes) Abandoned=Abandonné RemainderToPay=Reste à payer RemainderToTake=Reste à encaisser @@ -231,6 +235,8 @@ Deposit=Accompte Deposits=Accomptes DiscountFromCreditNote=Remise issue de l'avoir %s DiscountFromDeposit=Paiements issue de l'accompte %s +AbsoluteDiscountUse=Ce type de crédit ne peut s'utiliser que sur un facture avant sa validation +CreditNoteDepositUse=La facture doit être validée pour pouvoir utiliser ce type de crédits NewGlobalDiscount=Nouvelle remise fixe NoteReason=Note/Motif ReasonDiscount=Motif @@ -319,7 +325,8 @@ LawApplicationPart3=vendeur jusqu'à complet encaissement de LawApplicationPart4=leurs prix. LimitedLiabilityCompanyCapital=SARL au Capital de UseDiscount=Appliquer remise -UseCreditNoteInInvoicePayment=Réduire paiement avec ce credit +UseCredit=Utiliser crédit +UseCreditNoteInInvoicePayment=Réduire le montant du reste à payé avec ce credit MenuChequeDeposits=Remises de chèques MenuCheques=Gestion chèques MenuChequesReceipts=Bordereaux diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 336c04f2863..448ba18d6e3 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -130,7 +130,7 @@ CustomerAbsoluteDiscountShort=Remise fixe CompanyHasRelativeDiscount=Ce client a une remise par défaut de %s%% CompanyHasNoRelativeDiscount=Ce client n'a pas de remises relatives par défaut CompanyHasAbsoluteDiscount=Ce client a %s %s de remises fixes disponibles -CompanyHasCreditNote=Ce client a %s %s d'avoirs ou accomptes disponibles +CompanyHasCreditNote=Ce client a %s %s d'avoirs/accomptes disponibles CompanyHasNoAbsoluteDiscount=Ce client n'a pas ou plus de remises fixes disponibles CustomerAbsoluteDiscountAllUsers=Remises fixes en cours (accordées par tout utilisateur) CustomerAbsoluteDiscountMy=Remises fixes en cours (accordées personnellement) diff --git a/htdocs/soc.php b/htdocs/soc.php index 9d5e1ac8425..a6b2c4adf9f 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -965,7 +965,7 @@ else print '
'; print ''; - // + // Name print ''; print '
'.$langs->trans('Name').''; print $form->showrefnav($soc,'socid','',1,'rowid','nom');