From 4606095b1e2dc7cf7eec1f0b69073f1f554277b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Jan 2009 23:49:32 +0000 Subject: [PATCH] Add navigation bar on supplier orders --- htdocs/commande/commande.class.php | 4 +- htdocs/commande/fiche.php | 6 +- htdocs/fourn/commande/fiche.php | 38 ++++++----- htdocs/fourn/fournisseur.commande.class.php | 15 +++-- .../modules/commande/pdf_einstein.modules.php | 42 +++++++----- .../modules/facture/pdf_crabe.modules.php | 33 ++++++---- .../livraison/pdf/pdf_typhon.modules.php | 65 +++++++++++++++---- .../propale/pdf_propale_azur.modules.php | 31 ++++++--- .../pdf/pdf_muscadet.modules.php | 47 ++++++++++---- htdocs/langs/en_US/stocks.lang | 2 +- htdocs/langs/fr_FR/stocks.lang | 2 +- htdocs/lib/fourn.lib.php | 23 ++++--- 12 files changed, 204 insertions(+), 104 deletions(-) diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 8e6bf2b10b1..3750a89b12e 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -809,8 +809,8 @@ class Commande extends CommonObject /** * \brief Get object and lines from database - * \param rowid id of object to load - * \param ref Ref of invoice + * \param id Id of object to load + * \param ref Ref of object * \return int >0 if OK, <0 if KO */ function fetch($id,$ref='') diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 3cf71c2fedc..10a2bfbeceb 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2008 Regis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -1966,8 +1966,8 @@ else } } - // Supprimer commande - if ($commande->statut == 0 && $user->rights->commande->supprimer) + // Delete order + if ($user->rights->commande->supprimer) { print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 8187d4bb6a2..373fec262dc 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -476,12 +476,18 @@ $formorder = new FormOrder($db); /* */ /* *************************************************************************** */ -if ($id > 0) +$now=gmmktime(); + +$id = $_GET['id']; +$ref= $_GET['ref']; +if ($id > 0 || ! empty($ref)) { //if ($mesg) print $mesg.'
'; + $commande = new CommandeFournisseur($db); - if ($commande->fetch($id) >= 0) + $result=$commande->fetch($_GET['id'],$_GET['ref']); + if ($result >= 0) { $soc = new Societe($db); $soc->fetch($commande->socid); @@ -583,20 +589,20 @@ if ($id > 0) // Ref print ''.$langs->trans("Ref").''; - print ''.$commande->ref.''; + print ''; + print $html->showrefnav($commande,'ref','',1,'ref','ref'); + print ''; print ''; // Fournisseur print ''.$langs->trans("Supplier").""; - print ''; - print '
'; - print img_object($langs->trans("ShowSupplier"),'company').' '.$soc->nom.''; + print ''.$soc->getNomUrl(1,'supplier').''; print ''; // Statut print ''; print ''.$langs->trans("Status").''; - print ''; + print ''; print $commande->getLibStatut(4); print ""; @@ -604,25 +610,22 @@ if ($id > 0) if ($commande->methode_commande_id > 0) { print ''.$langs->trans("Date").''; - if ($commande->date_commande) { print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n"; } + print ""; - print ''; if ($commande->methode_commande) { - print $langs->trans("Method")." : " .$commande->methode_commande; + print ''.$langs->trans("Method").''.$commande->methode_commande.''; } - print ""; } // Auteur print ''.$langs->trans("AuthorRequest").''; print ''.$author->getNomUrl(1).''; - print ''; - print " "; + print ''; // Projet if ($conf->projet->enabled) @@ -643,19 +646,20 @@ if ($id > 0) { $html->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->projet_id, 'none'); } - print ''; + print ''; + print ''; } // Ligne de 3 colonnes print ''.$langs->trans("AmountHT").''; print ''.price($commande->total_ht).''; - print ''.$langs->trans("Currency".$conf->monnaie).' '; + print ''.$langs->trans("Currency".$conf->monnaie).''; print ''.$langs->trans("AmountVAT").''.price($commande->total_tva).''; - print ''.$langs->trans("Currency".$conf->monnaie).' '; + print ''.$langs->trans("Currency".$conf->monnaie).''; print ''.$langs->trans("AmountTTC").''.price($commande->total_ttc).''; - print ''.$langs->trans("Currency".$conf->monnaie).' '; + print ''.$langs->trans("Currency".$conf->monnaie).''; print ""; diff --git a/htdocs/fourn/fournisseur.commande.class.php b/htdocs/fourn/fournisseur.commande.class.php index 1806ae34e2c..88886fb2828 100644 --- a/htdocs/fourn/fournisseur.commande.class.php +++ b/htdocs/fourn/fournisseur.commande.class.php @@ -71,10 +71,12 @@ class CommandeFournisseur extends Commande /** - * \brief Load a supplier order - * \param Id of order to load + * \brief Get object and lines from database + * \param id Id of order to load + * \param ref Ref of object + * \return int >0 if OK, <0 if KO */ - function fetch($id) + function fetch($id,$ref='') { $sql = "SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva,"; $sql .= " ".$this->db->pdate("c.date_commande")." as date_commande, c.fk_projet as fk_project, c.remise_percent, c.source, c.fk_methode_commande,"; @@ -82,7 +84,8 @@ class CommandeFournisseur extends Commande $sql .= " cm.libelle as methode_commande"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_methode_commande_fournisseur as cm ON cm.rowid = c.fk_methode_commande"; - $sql .= " WHERE c.rowid = ".$id; + if ($ref) $sql.= " WHERE c.ref='".$ref."'"; + else $sql.= " WHERE c.rowid=".$id; dolibarr_syslog("CommandeFournisseur::fetch sql=".$sql,LOG_DEBUG); $resql = $this->db->query($sql) ; @@ -1083,7 +1086,7 @@ class CommandeFournisseur extends Commande $sql.= " SET fk_statut = ".$statut; $sql.= " WHERE rowid = ".$this->id; $sql.= " AND (fk_statut = 3 OR fk_statut = 4)"; - + dolibarr_syslog("CommandeFournisseur::Livraison sql=".$sql); $resql=$this->db->query($sql); if ($resql) @@ -1289,7 +1292,7 @@ class CommandeFournisseur extends Commande { // Mise a jour info denormalisees au niveau facture $this->update_price(); - + $this->db->commit(); return $result; } diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index 0253f956d55..45b58c7706b 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -123,7 +123,7 @@ class pdf_einstein extends ModelePDFCommandes if ($conf->commande->dir_output) { - // D�finition de l'objet $com (pour compatibilite ascendante) + // Definition de l'objet $com (pour compatibilite ascendante) if (! is_object($com)) { $id = $com; @@ -208,7 +208,7 @@ class pdf_einstein extends ModelePDFCommandes $tab_top = 90; $tab_top_newpage = 50; $tab_height = 110; - $tab_height_newpage = 180; + $tab_height_newpage = 150; // Affiche notes if (! empty($com->note_public)) @@ -221,7 +221,7 @@ class pdf_einstein extends ModelePDFCommandes $nexY = $pdf->GetY(); $height_note=$nexY-$tab_top; - // Rect prend une longueur en 3eme param + // Rect prend une longueur en 3eme et 4eme param $pdf->SetDrawColor(192,192,192); $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); @@ -233,9 +233,9 @@ class pdf_einstein extends ModelePDFCommandes $height_note=0; } - $iniY = $tab_top + 8; - $curY = $tab_top + 8; - $nexY = $tab_top + 8; + $iniY = $tab_top + 7; + $curY = $tab_top + 7; + $nexY = $tab_top + 7; // Boucle sur les lignes for ($i = 0 ; $i < $nblignes ; $i++) @@ -247,7 +247,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetFont('Arial','', 9); // Dans boucle pour gerer multi-page // Description $pdf->writeHTMLCell($this->posxtva-$this->posxdesc-1, 3, $this->posxdesc-1, $curY, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 1); -//if ($i==1) { print $outputlangs->convToOutputCharset($libelleproduitservice);exit; } + //if ($i==1) { print $outputlangs->convToOutputCharset($libelleproduitservice);exit; } $pdf->SetFont('Arial','', 9); // On repositionne la police par defaut @@ -298,8 +298,18 @@ class pdf_einstein extends ModelePDFCommandes $nblineFollowDesc = 0; } - // test si besoin nouvelle page - if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1)) + // Test if a new page is required + if ($pagenb == 1) + { + $tab_top_in_current_page=$tab_top; + $tab_height_in_current_page=$tab_height; + } + else + { + $tab_top_in_current_page=$tab_top_newpage; + $tab_height_in_current_page=$tab_height_newpage; + } + if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) { if ($pagenb == 1) { @@ -320,12 +330,12 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell(0, 3, '', 0, 'J'); // Set interline to 3 $pdf->SetTextColor(0,0,0); - $nexY = $tab_top_newpage + 8; + $nexY = $tab_top_newpage + 7; } } - // Affiche cadre tableau + // Show square if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); @@ -333,8 +343,8 @@ class pdf_einstein extends ModelePDFCommandes } else { - $this->_tableau($pdf, $tab_top_newpage, $tab_height, $nexY, $outputlangs); - $bottomlasttab=$tab_top_newpage + $tab_height + 1; + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); + $bottomlasttab=$tab_top_newpage + $tab_height_newpage + 1; } // Affiche zone infos @@ -638,7 +648,7 @@ class pdf_einstein extends ModelePDFCommandes { global $conf; - // Montants exprim�s en (en tab_top - 1) + // Montants exprimes en (en tab_top - 1) $pdf->SetTextColor(0,0,0); $pdf->SetFont('Arial','',8); $titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentitiesnoconv("Currency".$conf->monnaie)); @@ -646,9 +656,9 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetDrawColor(128,128,128); - // Rect prend une longueur en 3eme param + // Rect prend une longueur en 3eme et 4eme param $pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height); - // line prend une position y en 3eme param + // line prend une position y en 3eme et 4eme param $pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); $pdf->SetFont('Arial','',9); diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index 5cc52765bfc..6dbcd7f4e09 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -207,11 +207,10 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell(0, 3, '', 0, 'J'); // Set interline to 3 $pdf->SetTextColor(0,0,0); - $pagenb = 1; $tab_top = 90; $tab_top_newpage = 50; $tab_height = 110; - $tab_height_newpage = 180; + $tab_height_newpage = 150; // Affiche notes if (! empty($fac->note_public)) @@ -236,9 +235,9 @@ class pdf_crabe extends ModelePDFFactures $height_note=0; } - $iniY = $tab_top + 8; - $curY = $tab_top + 8; - $nexY = $tab_top + 8; + $iniY = $tab_top + 7; + $curY = $tab_top + 7; + $nexY = $tab_top + 7; // Loop on each lines for ($i = 0 ; $i < $nblignes ; $i++) @@ -305,8 +304,18 @@ class pdf_crabe extends ModelePDFFactures $nblineFollowDesc = 0; } - // test si besoin nouvelle page - if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1)) + // Test if a new page is required + if ($pagenb == 1) + { + $tab_top_in_current_page=$tab_top; + $tab_height_in_current_page=$tab_height; + } + else + { + $tab_top_in_current_page=$tab_top_newpage; + $tab_height_in_current_page=$tab_height_newpage; + } + if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) { if ($pagenb == 1) { @@ -327,14 +336,12 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell(0, 3, '', 0, 'J'); // Set interline to 3 $pdf->SetTextColor(0,0,0); - $nexY = $tab_top_newpage + 8; - $pdf->SetTextColor(0,0,0); - $pdf->SetFont('Arial','', 10); + $nexY = $tab_top_newpage + 7; } } - // Affiche cadre tableau + // Show square if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); @@ -342,8 +349,8 @@ class pdf_crabe extends ModelePDFFactures } else { - $this->_tableau($pdf, $tab_top_newpage, $tab_height, $nexY, $outputlangs); - $bottomlasttab=$tab_top_newpage + $tab_height + 1; + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); + $bottomlasttab=$tab_top_newpage + $tab_height_newpage + 1; } // Affiche zone infos diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php index 1cafa7d6eec..c68ec5058d8 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php @@ -209,11 +209,35 @@ class pdf_typhon extends ModelePDFDeliveryOrder $tab_top = 90; $tab_top_newpage = 50; - $tab_height = 150; + $tab_height = 110; + $tab_height_newpage = 150; - $iniY = $tab_top + 8; - $curY = $tab_top + 8; - $nexY = $tab_top + 8; + // Affiche notes + if (! empty($delivery->note_public)) + { + $tab_top = 88; + + $pdf->SetFont('Arial','', 9); // Dans boucle pour gerer multi-page + $pdf->SetXY ($this->posxdesc-1, $tab_top); + $pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($fac->note_public), 0, 'J'); + $nexY = $pdf->GetY(); + $height_note=$nexY-$tab_top; + + // Rect prend une longueur en 3eme param + $pdf->SetDrawColor(192,192,192); + $pdf->Rect($this->marge_gauche, $tab_top-1, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $height_note+1); + + $tab_height = $tab_height - $height_note; + $tab_top = $nexY+6; + } + else + { + $height_note=0; + } + + $iniY = $tab_top + 7; + $curY = $tab_top + 7; + $nexY = $tab_top + 7; // Boucle sur les lignes for ($i = 0 ; $i < $nblignes ; $i++) @@ -263,9 +287,28 @@ class pdf_typhon extends ModelePDFDeliveryOrder */ $nexY+=2; // Passe espace entre les lignes - if ($nexY > 200 && $i < ($nblignes - 1)) + // Test if a new page is required + if ($pagenb == 1) { - $this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY, $outputlangs); + $tab_top_in_current_page=$tab_top; + $tab_height_in_current_page=$tab_height; + } + else + { + $tab_top_in_current_page=$tab_top_newpage; + $tab_height_in_current_page=$tab_height_newpage; + } + if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) + { + if ($pagenb == 1) + { + $this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY, $outputlangs); + } + else + { + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); + } + $this->_pagefoot($pdf, $outputlangs); // New page @@ -276,12 +319,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->MultiCell(0, 3, '', 0, 'J'); // Set interline to 3 $pdf->SetTextColor(0,0,0); - $nexY = $tab_top_newpage + 8; + $nexY = $tab_top_newpage + 7; } - } - // Affiche cadre tableau + // Show square if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); @@ -289,10 +331,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder } else { - $this->_tableau($pdf, $tab_top_newpage, $tab_height, $nexY, $outputlangs); - $bottomlasttab=$tab_top_newpage + $tab_height + 1; + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); + $bottomlasttab=$tab_top_newpage + $tab_height_newpage + 1; } + /* * Pied de page */ diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index 74ad60ccd2c..0bf4ab784eb 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -206,10 +206,11 @@ class pdf_propale_azur extends ModelePDFPropales $pdf->SetTextColor(0,0,0); $tab_top = 90; + $tab_top_middlepage = 50; $tab_top_newpage = 50; $tab_height = 110; - $tab_height_newpage = 150; $tab_height_middlepage = 190; + $tab_height_newpage = 150; // Affiche notes if (! empty($propale->note_public)) @@ -234,9 +235,9 @@ class pdf_propale_azur extends ModelePDFPropales $height_note=0; } - $iniY = $tab_top + 8; - $curY = $tab_top + 8; - $nexY = $tab_top + 8; + $iniY = $tab_top + 7; + $curY = $tab_top + 7; + $nexY = $tab_top + 7; // Loop on each lines for ($i = 0 ; $i < $nblignes ; $i++) @@ -308,16 +309,26 @@ class pdf_propale_azur extends ModelePDFPropales $nblineFollowDesc = 0; } - // test si besoin nouvelle page - if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1)) + // Test if a new page is required + if ($pagenb == 1) + { + $tab_top_in_current_page=$tab_top; + $tab_height_in_current_page=$tab_height; + } + else + { + $tab_top_in_current_page=$tab_top_newpage; + $tab_height_in_current_page=$tab_height_newpage; + } + if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) { if ($pagenb == 1) { - $this->_tableau($pdf, $tab_top, $tab_height_newpage, $nexY, $outputlangs); + $this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY, $outputlangs); } else { - $this->_tableau($pdf, $tab_top_newpage, $tab_height_middlepage, $nexY, $outputlangs); + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); } $this->_pagefoot($pdf,$outputlangs); @@ -330,12 +341,12 @@ class pdf_propale_azur extends ModelePDFPropales $pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 3 $pdf->SetTextColor(0,0,0); - $nexY = $tab_top_newpage + 8; + $nexY = $tab_top_newpage + 7; } } - // Affiche cadre tableau + // Show square if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); diff --git a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php index 9c44d911c2f..765f98f88d8 100644 --- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -210,7 +210,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $tab_top = 90; $tab_top_newpage = 50; $tab_height = 110; - $tab_height_newpage = 180; + $tab_height_newpage = 150; // Affiche notes if (! empty($com->note_public)) @@ -235,9 +235,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $height_note=0; } - $iniY = $tab_top + 8; - $curY = $tab_top + 8; - $nexY = $tab_top + 8; + $iniY = $tab_top + 7; + $curY = $tab_top + 7; + $nexY = $tab_top + 7; // Boucle sur les lignes for ($i = 0 ; $i < $nblignes ; $i++) @@ -288,9 +288,28 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $nexY+=2; // Passe espace entre les lignes - if ($nexY > 200 && $i < ($nblignes - 1)) + // Test if a new page is required + if ($pagenb == 1) { - $this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY, $outputlangs); + $tab_top_in_current_page=$tab_top; + $tab_height_in_current_page=$tab_height; + } + else + { + $tab_top_in_current_page=$tab_top_newpage; + $tab_height_in_current_page=$tab_height_newpage; + } + if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1)) + { + if ($pagenb == 1) + { + $this->_tableau($pdf, $tab_top, $tab_height + 20, $nexY, $outputlangs); + } + else + { + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); + } + $this->_pagefoot($pdf, $outputlangs); // New page @@ -301,11 +320,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->MultiCell(0, 3, '', 0, 'J'); // Set interline to 3 $pdf->SetTextColor(0,0,0); - $nexY = $tab_top_newpage + 8; + $nexY = $tab_top_newpage + 7; } } - // Affiche cadre tableau + + // Show square if ($pagenb == 1) { $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); @@ -313,20 +333,19 @@ class pdf_muscadet extends ModelePDFSuppliersOrders } else { - $this->_tableau($pdf, $tab_top_newpage, $tab_height, $nexY, $outputlangs); - $bottomlasttab=$tab_top_newpage + $tab_height + 1; + $this->_tableau($pdf, $tab_top_newpage, $tab_height_newpage, $nexY, $outputlangs); + $bottomlasttab=$tab_top_newpage + $tab_height_newpage + 1; } - $deja_regle = ""; - $posy=$this->_tableau_tot($pdf, $com, $deja_regle, $bottomlasttab, $outputlangs); - if ($deja_regle) { + if ($deja_regle) + { $this->_tableau_versements($pdf, $fac, $posy); } /* - * Mode de r�glement + * Mode de reglement */ if ((! defined("FACTURE_CHQ_NUMBER") || ! FACTURE_CHQ_NUMBER) && (! defined("FACTURE_RIB_NUMBER") || ! FACTURE_RIB_NUMBER)) { diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 6333ca7427b..b92ccf009cf 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -39,7 +39,7 @@ PMPValue=Value EnhancedValueOfWarehouses=Warehouses value UserWarehouseAutoCreate=Create a stock automatically when creating a user QtyDispatched=Quantity dispatched -OrderDispatch=Order dispatching +OrderDispatch=Stock dispatching RuleForStockManagementDecrease=Rule for stock management decrease RuleForStockManagementIncrease=Rule for stock management increase DeStockOnBill=Decrease real stocks on invoices/credit notes validation (warning, in this version, it's only in warehouse number 1 that stock is modified) diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index 65c37802003..092ff0be2a2 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -39,7 +39,7 @@ PMPValue=Valorisation (PMP) EnhancedValueOfWarehouses=Valorisation des stocks UserWarehouseAutoCreate=Créer un stock automatiquement à la création d'un utilisateur QtyDispatched=Quantité ventilée -OrderDispatch=Ventilation commande +OrderDispatch=Réception vers stocks RuleForStockManagementDecrease=Règle de gestion des décrémentations de stock RuleForStockManagementIncrease=Règle de gestion des incrémentations de stock DeStockOnBill=Décrémente les stocks physiques sur validation des factures/avoirs (attention, dans cette version, c'est toujours dans le premier entrepot numero 1 que se fait l'ajustement) diff --git a/htdocs/lib/fourn.lib.php b/htdocs/lib/fourn.lib.php index 826d7bc18fb..9954556e384 100644 --- a/htdocs/lib/fourn.lib.php +++ b/htdocs/lib/fourn.lib.php @@ -29,7 +29,7 @@ function facturefourn_prepare_head($fac) global $langs, $conf; $h = 0; $head = array(); - + $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$fac->id; $head[$h][1] = $langs->trans('Card'); $head[$h][2] = 'card'; @@ -39,7 +39,7 @@ function facturefourn_prepare_head($fac) $head[$h][1] = $langs->trans('BillContacts'); $head[$h][2] = 'contact'; $h++; - + $head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$fac->id; $head[$h][1] = $langs->trans('Notes'); $head[$h][2] = 'note'; @@ -69,7 +69,7 @@ function facturefourn_prepare_head($fac) $h++; } } - + return $head; } @@ -79,16 +79,19 @@ function ordersupplier_prepare_head($commande) global $langs, $conf; $h = 0; $head = array(); - + $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$commande->id; $head[$h][1] = $langs->trans("OrderCard"); $head[$h][2] = 'card'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/dispatch.php?id='.$commande->id; - $head[$h][1] = $langs->trans("OrderDispatch"); - $head[$h][2] = 'dispatch'; - $h++; + if ($conf->stock->enabled) + { + $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/dispatch.php?id='.$commande->id; + $head[$h][1] = $langs->trans("OrderDispatch"); + $head[$h][2] = 'dispatch'; + $h++; + } $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$commande->id; $head[$h][1] = $langs->trans("Note"); @@ -99,7 +102,7 @@ function ordersupplier_prepare_head($commande) $head[$h][1] = $langs->trans("Documents"); $head[$h][2] = 'documents'; $h++; - + $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/history.php?id='.$commande->id; $head[$h][1] = $langs->trans("OrderFollow"); $head[$h][2] = 'info'; @@ -119,7 +122,7 @@ function ordersupplier_prepare_head($commande) $h++; } } - + return $head; }