diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index d10a3df94ba..53b9de84588 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -458,7 +458,7 @@ $html = new Form($db); if ($_GET["action"] == 'create') { - print_titre("Emettre une facture"); + print_titre($langs->trans("NewBill")); if ($_GET["propalid"]) { @@ -686,7 +686,7 @@ if ($_GET["action"] == 'create') /* * */ - print ''; + print ''; print "\n"; print "\n"; @@ -695,11 +695,11 @@ if ($_GET["action"] == 'create') /* * Produits */ - print_titre("Produits"); + print_titre($langs->trans("Products")); print ''; - print ''; - print ''; + print ''; + print ''; $sql = "SELECT pt.rowid, p.label as product, p.ref, pt.price, pt.qty, p.rowid as prodid, pt.remise_percent"; $sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pt, ".MAIN_DB_PREFIX."product as p WHERE pt.fk_product = p.rowid AND pt.fk_propal = ".$_GET["propalid"]; @@ -759,9 +759,9 @@ if ($_GET["action"] == 'create') { print_titre("Produits"); - print '
'.$langs->trans("Ref").'Produit'.$langs->trans("Price").'RemiseQté.
'.$langs->trans("Ref").''.$langs->trans("Product").''.$langs->trans("Price").''.$langs->trans("Discount").''.$langs->trans("Qty").'
'; - print ''; - print ''; + print '
'.$langs->trans("Ref").'Produit'.$langs->trans("Price").'RemiseQté.
'; + print ''; + print ''; $sql = "SELECT pt.rowid, p.label as product, p.ref, pt.subprice, pt.qty, p.rowid as prodid, pt.remise_percent"; $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as pt, ".MAIN_DB_PREFIX."product as p"; @@ -833,13 +833,13 @@ else $hselected = $h; $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Apercu"); + $head[$h][1] = $langs->trans("Preview"); $h++; if ($fac->mode_reglement == 3) { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("StandingOrder"); + $head[$h][1] = $langs->trans("StandingOrders"); $h++; } @@ -964,7 +964,7 @@ else print "
'.$langs->trans("Ref").''.$langs->trans("Product").''.$langs->trans("Price").''.$langs->trans("Discount").''.$langs->trans("Qty").'
"; $db->free(); } else { - print $db->error(); + dolibarr_print_error($db); } print ""; @@ -1467,7 +1467,7 @@ else if ($num) { $i = 0; $total = 0; - print "

"; + print "
"; if ($num >1) { print_titre("Propositions commerciales associées"); @@ -1524,6 +1524,8 @@ else $month=$_GET["month"]; $year=$_GET["year"]; + $fac=new Facture($db); + if ($page == -1) { $page = 0 ; @@ -1674,7 +1676,7 @@ else } } - print ''.img_object($langs->trans("Bill"),"bill")." "; + print ''.img_object($langs->trans("ShowBill"),"bill").' '; print ''.$objp->facnumber.''.$objp->increment."\n"; if ($objp->df > 0 ) @@ -1693,11 +1695,12 @@ else { print "!!!\n"; } - print ''.$objp->nom.''; + print ''.img_object($langs->trans("ShowCompany"),"company").' '.$objp->nom.''; print "".price($objp->total).""; print "".price($objp->total_ttc).""; print "".price($objp->am).""; + // Affiche statut de la facture if (! $objp->paye) { @@ -1739,7 +1742,7 @@ else } print ""; - $db->free(); + $db->free($result); } else { diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 9554db4225a..cb71f373df6 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -78,14 +78,14 @@ if ($_GET["facid"] > 0) $head[$h][1] = $langs->trans("CardBill"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Apercu"); + $head[$h][1] = $langs->trans("Preview"); $hselected = $h; $h++; if ($fac->mode_reglement == 3) { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Prélèvement"); + $head[$h][1] = $langs->trans("StandingOrders"); $h++; } @@ -206,7 +206,8 @@ if ($_GET["facid"] > 0) imagick_writeimage( $handle, $file .".png"); } else { - print "Les fonctions imagick ne sont pas disponibles sur ce PHP"; + $langs->load("other"); + print $langs->trans("ErrorNoImagickReadimage"); } } diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 480916a3e59..6fa20b20182 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -51,7 +51,7 @@ $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$facture->id; $head[$h][1] = $langs->trans("CardBill"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$facture->id; -$head[$h][1] = $langs->trans("Apercu"); +$head[$h][1] = $langs->trans("Preview"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$facture->id; $head[$h][1] = $langs->trans("Note"); diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 7a549f7519d..e460dc15992 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -47,6 +47,9 @@ if ($user->societe_id > 0) } +$facture = new Facture($db); +$facture->fetch($_GET["facid"]); + /******************************************************************************/ /* Actions */ @@ -54,13 +57,10 @@ if ($user->societe_id > 0) if ($_POST["action"] == 'update' && $user->rights->facture->creer) { - - - $facture = new Facture($db); - $facture->fetch($_GET["facid"]); $facture->update_note($_POST["note"]); } + /******************************************************************************/ /* Fin des Actions */ /******************************************************************************/ @@ -68,15 +68,9 @@ if ($_POST["action"] == 'update' && $user->rights->facture->creer) llxHeader(); -$html = new Form($db); - if ($_GET["facid"]) { - $facture = new Facture($db); - if ( $facture->fetch($_GET["facid"]) ) - { - $soc = new Societe($db, $facture->socidp); $soc->fetch($facture->socidp); @@ -86,13 +80,13 @@ if ($_GET["facid"]) $head[$h][1] = $langs->trans("CardBill"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$facture->id; - $head[$h][1] = $langs->trans("Apercu"); + $head[$h][1] = $langs->trans("Preview"); $h++; if ($facture->mode_reglement == 3) { $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$facture->id; - $head[$h][1] = $langs->trans("Prélèvement"); + $head[$h][1] = $langs->trans("StandingOrders"); $h++; } @@ -108,30 +102,16 @@ if ($_GET["facid"]) print ''; - - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; + print ""; + + print ''; + print "\n"; + print ""; print ''; @@ -165,9 +145,9 @@ if ($_GET["facid"]) print ""; - } - } + $db->close(); + llxFooter("Dernière modification $Date$ révision $Revision$"); ?> diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 7b3a062331a..adef351f64d 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -100,10 +100,10 @@ if ($_GET["facid"] > 0) $head[$h][1] = $langs->trans("CardBill"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Apercu"); + $head[$h][1] = $langs->trans("Preview"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$fac->id; - $head[$h][1] = $langs->trans("Prélévement"); + $head[$h][1] = $langs->trans("StandingOrders"); $hselected = $h; $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$fac->id; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 12a89421e56..ec431be0274 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -173,4 +173,5 @@ ByUsers=By users Links=Links Link=Link Receipts=Receipts -Rejects=Rejects \ No newline at end of file +Rejects=Rejects +Preview=Preview \ No newline at end of file diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 188683ae2f8..fa9a90ceb93 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -7,6 +7,7 @@ ErrorPasswordDiffers=Passwords differs, please type them again. ErrorForbidden=Access forbidden.
You try to access to a page, area or feature that is not allowed to your user. ErrorForbidden2=Permission for this login can be defined by your Dolibarr administrator from menu %s->%s. ErrorForbidden3=It seems that Dolibarr is not used through an authenticated session. Take a look at Dolibarr setup documentation to know how to manage authentications (htaccess, mod_auth or other...). +ErrorNoImagickReadimage=Function imagick_readimage is not found in this PHP. No preview can be available. AddTrip=Add trip Tools=Tools Birthday=Birthday diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 3d733aec204..089bde4a556 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -174,4 +174,5 @@ ByUsers=Par utilisateurs Links=Liens Link=Lien Receipts=Bons -Rejects=Rejets \ No newline at end of file +Rejects=Rejets +Preview=Aperçu \ No newline at end of file diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index a42e4fc7a6b..e134e6da9c1 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -7,6 +7,7 @@ ErrorPasswordDiffers=Les mots de passe ne sont pas identiques, veuillez les sais ErrorForbidden=Accès non autorisé.
Vous essayez d'accéder à une page, zone ou fonction qui n'est pas autorisée pour votre compte utilisateur. ErrorForbidden2=Les permissions pour ce login peuvent être attribuée par l'administrateur Dolibarr via le menu %s->%s. ErrorForbidden3=Dolibarr ne semble pas fonctionner au sein d'une session authentifiée. Consulter la documentation d'installation de Dolibarr pour connaitre comment gérer les autentifications (htaccess, mod_auth ou autre...). +ErrorNoImagickReadimage=La fonction imagick_readimage n'est pas présente sur ce PHP. L'aperçu n'est donc pas disponible. AddTrip=Créer déplacement Tools=Outils Birthday=Anniversaire
'.$langs->trans("Company").''; - if ($soc->client == 1) - { - $url = DOL_URL_ROOT.'/compta/fiche.php?socid='.$soc->id; - } - else - { - $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$soc->id; - } - print ''.$soc->nom.''.$langs->trans("Status").''.$facture->statut_libelle.'
'.$langs->trans("Date").''.strftime("%A %d %B %Y",$facture->date); - if ($facture->fin_validite) - { - print " (".strftime("%d %B %Y",$facture->fin_validite).")"; - } - print '
'.$langs->trans("Company").''; + print ''.$soc->nom.''.$langs->trans("Author").''; - $author = new User($db, $facture->user_author); - $author->fetch(''); - print $author->fullname.'
Conditions de réglement" . $facture->cond_reglement ."
'.$langs->trans("Date").'".strftime("%A %d %B %Y",$facture->date)."Date limite de réglement" . strftime("%d %B %Y",$facture->date_lim_reglement) ."
'.$langs->trans("Note").' :