From 52f4f72e6f8a4dfc7774e88da7e310dd2cc537c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Mar 2012 22:39:43 +0200 Subject: [PATCH] Checkstyle --- htdocs/admin/mails.php | 15 ++++++++++++--- htdocs/cashdesk/affContenu.php | 4 ++-- htdocs/cashdesk/class/Facturation.class.php | 12 ++++++------ htdocs/cashdesk/tpl/facturation1.tpl.php | 2 +- htdocs/cashdesk/tpl/liste_articles.tpl.php | 2 +- htdocs/cashdesk/tpl/ticket.tpl.php | 6 +++--- htdocs/cashdesk/tpl/validation1.tpl.php | 8 ++++---- htdocs/cashdesk/validation_verif.php | 14 +++++++------- .../core/modules/facture/modules_facture.php | 18 +++++++++--------- .../modules/fichinter/modules_fichinter.php | 7 +++++-- 10 files changed, 50 insertions(+), 38 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 8e5a7b1afc2f1..fbbf3356eae78 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -212,9 +212,18 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php"); $mailfile = new CMailFile( - $subject, $sendto, $email_from, $body, - $filepath, $mimetype, $filename, - $sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to + $subject, + $sendto, + $email_from, + $body, + $filepath, + $mimetype, + $filename, + $sendtocc, + $sendtoccc, + $deliveryreceipt, + $msgishtml, + $errors_to ); $result=$mailfile->sendfile(); diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index dc5c99daa2201..a4e3db7863b91 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -47,8 +47,8 @@ require ('tpl/liste_articles.tpl.php'); -$obj_facturation->prix_total_ht($lst_total_ht); -$obj_facturation->prix_total_ttc($lst_total_ttc); +$obj_facturation->prixTotalHt($lst_total_ht); +$obj_facturation->prixTotalTtc($lst_total_ttc); print ''; diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index fcad5848c17c0..eff1cfbf5900e 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -253,9 +253,9 @@ private function razPers() $this->montantRendu('RESET'); $this->paiementLe('RESET'); - $this->prix_total_ht('RESET'); - $this->montant_tva('RESET'); - $this->prix_total_ttc('RESET'); + $this->prixTotalHt('RESET'); + $this->montantTva('RESET'); + $this->prixTotalTtc('RESET'); } @@ -588,7 +588,7 @@ public function paiementLe( $aPaiementLe=null ) * @param int $aTotalHt Total amount * @return int Total amount */ - public function prix_total_ht( $aTotalHt=null ) + public function prixTotalHt( $aTotalHt=null ) { if ( !$aTotalHt ) { @@ -611,7 +611,7 @@ public function prix_total_ht( $aTotalHt=null ) * @param int $aMontantTva Amount vat * @return int Amount vat */ - public function montant_tva( $aMontantTva=null ) + public function montantTva( $aMontantTva=null ) { if ( !$aMontantTva ) { @@ -635,7 +635,7 @@ public function montant_tva( $aMontantTva=null ) * @param int $aTotalTtc Amount ttc * @return int Amount ttc */ - public function prix_total_ttc( $aTotalTtc=null ) + public function prixTotalTtc( $aTotalTtc=null ) { if ( !$aTotalTtc ) { diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 6963695c78e48..59c3a6fb65d0b 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -169,7 +169,7 @@ trans("TotalTicket"); ?>trans("Received"); ?>trans("Change"); ?> - + diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index 79e7359cc10d5..cf9fd00cbe611 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -68,7 +68,7 @@ } $obj_facturation->calculTotaux(); -$total_ttc = $obj_facturation->prix_total_ttc(); +$total_ttc = $obj_facturation->prixTotalTtc(); echo ('

'.$langs->trans("Total").' : '.price2num($total_ttc, 'MT').' '.$conf->currency.'

'."\n"); ?> diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index a3a055ac0827a..52a58a2bad849 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -138,9 +138,9 @@ \n"; -echo '\n"; -echo '\n"; +echo '\n"; +echo '\n"; +echo '\n"; ?>
'.$langs->trans("TotalHT").''.price2num($obj_facturation->prix_total_ht(),'MT')." ".$conf->currency."
'.$langs->trans("TotalVAT").''.price2num($obj_facturation->montant_tva(),'MT')." ".$conf->currency."
'.$langs->trans("TotalTTC").''.price2num($obj_facturation->prix_total_ttc(),'MT')." ".$conf->currency."
'.$langs->trans("TotalHT").''.price2num($obj_facturation->prixTotalHt(),'MT')." ".$conf->currency."
'.$langs->trans("TotalVAT").''.price2num($obj_facturation->montantTva(),'MT')." ".$conf->currency."
'.$langs->trans("TotalTTC").''.price2num($obj_facturation->prixTotalTtc(),'MT')." ".$conf->currency."
diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index fdcda6e3e7c54..5cca10af8eb9c 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -26,12 +26,12 @@ - + montant_tva() ) { + if ( $obj_facturation->montantTva() ) { - echo (''); + echo (''); } else @@ -41,7 +41,7 @@ } ?> - +
trans("Invoice"); ?>numInvoice(); ?>
trans("TotalHT"); ?>prix_total_ht(),'MT').' '.$conf->currency; ?>
trans("TotalHT"); ?>prixTotalHt(),'MT').' '.$conf->currency; ?>
'.$langs->trans("VAT").''.price2num($obj_facturation->montant_tva(),'MT').' '.$conf->currency.'
'.$langs->trans("VAT").''.price2num($obj_facturation->montantTva(),'MT').' '.$conf->currency.'
trans("TotalTTC"); ?> prix_total_ttc(),'MT').' '.$conf->currency; ?>
trans("TotalTTC"); ?> prixTotalTtc(),'MT').' '.$conf->currency; ?>
trans("PaymentMode"); ?> getSetPaymentMode()) diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index 5bf7bdab68b91..f3772d617fae4 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -57,7 +57,7 @@ // Si paiement autre qu'en especes, montant encaisse = prix total $mode_reglement = $obj_facturation->getSetPaymentMode(); if ( $mode_reglement != 'ESP' ) { - $montant = $obj_facturation->prix_total_ttc(); + $montant = $obj_facturation->prixTotalTtc(); } else { $montant = $_POST['txtEncaisse']; } @@ -66,7 +66,7 @@ $obj_facturation->montantEncaisse($montant); //Determination de la somme rendue - $total = $obj_facturation->prix_total_ttc(); + $total = $obj_facturation->prixTotalTtc(); $encaisse = $obj_facturation->montantEncaisse(); $obj_facturation->montantRendu($encaisse - $total); @@ -198,9 +198,9 @@ $invoice->date_creation=$now; $invoice->date=$now; $invoice->date_lim_reglement=0; - $invoice->total_ht=$obj_facturation->prix_total_ht(); - $invoice->total_tva=$obj_facturation->montant_tva(); - $invoice->total_ttc=$obj_facturation->prix_total_ttc(); + $invoice->total_ht=$obj_facturation->prixTotalHt(); + $invoice->total_tva=$obj_facturation->montantTva(); + $invoice->total_ttc=$obj_facturation->prixTotalTtc(); $invoice->note=$note; $invoice->cond_reglement_id=$cond_reglement_id; $invoice->mode_reglement_id=$mode_reglement_id; @@ -234,7 +234,7 @@ $payment=new Paiement($db); $payment->datepaye=$now; $payment->bank_account=$conf_fkaccount; - $payment->amounts[$invoice->id]=$obj_facturation->prix_total_ttc(); + $payment->amounts[$invoice->id]=$obj_facturation->prixTotalTtc(); $payment->note=$langs->trans("Payment").' '.$langs->trans("Invoice").' '.$obj_facturation->numInvoice(); $payment->paiementid=$invoice->mode_reglement_id; $payment->num_paiement=''; @@ -254,7 +254,7 @@ if (! $error) { - if ($invoice->total_ttc == $obj_facturation->prix_total_ttc() + if ($invoice->total_ttc == $obj_facturation->prixTotalTtc() && $obj_facturation->getSetPaymentMode() != 'DIFF') { // We set status to payed diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index 43b0dae3c336b..973a8461799ab 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -147,15 +147,15 @@ function getVersion() /** * Create a document onto disk according to template module. * - * @param DoliDB $db Database handler - * @param Object $object Object invoice - * @param string $modele Force template to use ('' to not force) - * @param Translate $outputlangs objet lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param HookManager $hookmanager Hook manager instance - * @return int <0 if KO, >0 if OK + * @param DoliDB $db Database handler + * @param Object $object Object invoice + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance + * @return int <0 if KO, >0 if OK */ function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false) { diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index c14c487882125..de1a1c79ee288 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -30,8 +30,7 @@ /** - * \class ModelePDFFicheinter - * \brief Classe mere des modeles de fiche intervention + * Parent class to manage intervention document templates */ abstract class ModelePDFFicheinter extends CommonDocGenerator { @@ -149,6 +148,10 @@ function getVersion() * @param Object $object Object fichinter * @param string $modele force le modele a utiliser ('' par defaut) * @param Translate $outputlangs objet lang a utiliser pour traduction + * @param int $hidedetails Hide details of lines + * @param int $hidedesc Hide description + * @param int $hideref Hide ref + * @param HookManager $hookmanager Hook manager instance * @return int 0 if KO, 1 if OK */ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false)