diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index 591328113a1..703fd6d44cc 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -205,7 +205,12 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell(14, 5, $fac->lignes[$i]->remise_percent."%", 0, 'R'); } - // Total TTC + // Total TVA + $pdf->SetXY ($postotttc, $curY); + $total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty); + $pdf->MultiCell(26, 5, $total, 0, 'R', 0); + + // Total HT $pdf->SetXY ($postotttc, $curY); $total = price($fac->lignes[$i]->price * $fac->lignes[$i]->qty); $pdf->MultiCell(26, 5, $total, 0, 'R', 0); diff --git a/htdocs/searchpostalcode.php b/htdocs/searchpostalcode.php index 612021b08ec..1f05ca22623 100644 --- a/htdocs/searchpostalcode.php +++ b/htdocs/searchpostalcode.php @@ -35,48 +35,54 @@ * ************************************************************************* */ /** - \file htdocs/searchpostalcode.php - \ingroup societe - \brief Recherche de la ville correspondant au code postal saisi. 1er tour on cherche dans la table societé, si on a deux clients dans la même ville c'est direct. Si jamais ça ne donne rien alors on lance la recherche dans la table des codes postaux. - \version $Revision$ + \file htdocs/searchpostalcode.php + \ingroup societe + \brief Recherche de la ville correspondant au code postal saisi. 1er tour on cherche dans la table societé, si on a deux clients dans la même ville c'est direct. Si jamais ça ne donne rien alors on lance la recherche dans la table des codes postaux. + \version $Revision$ */ require("pre.inc.php"); + $user->getrights('societe'); $langs->load("companies"); -function run_request($table) { - global $db; - $sql = "SELECT ville,cp from ".MAIN_DB_PREFIX.$table; - if(isset($_GET['cp']) && trim($_GET['cp']) != "") { - $sql .= " where cp "; - if(strstr($_GET['cp'],'%')) - $sql .="LIKE"; - else - $sql .="="; - $sql .= " '" . $_GET['cp'] . "'"; - } - else { - $sql .= " LIMIT 30"; - } - $result=$db->query($sql); - if (!$result) { - dolibarr_print_error($db); - } - print $sql; + +function run_request($table) +{ + global $db; + $sql = "SELECT ville,cp from ".MAIN_DB_PREFIX.$table; + if(isset($_GET['cp']) && trim($_GET['cp']) != "") { + $sql .= " where cp "; + if(strstr($_GET['cp'],'%')) + $sql .="LIKE"; + else + $sql .="="; + $sql .= " '" . $_GET['cp'] . "'"; + } + else { + $sql .= " LIMIT 30"; + } + $result=$db->query($sql); + if (!$result) { + dolibarr_print_error($db); + } + // print $sql; } -/* - * Sécurité accés client - */ +// Sécurité accés client if ($user->societe_id > 0) { - $_GET["action"] = ''; - $_POST["action"] = ''; - $_GET["socid"] = $user->societe_id; + $_GET["action"] = ''; + $_POST["action"] = ''; + $_GET["socid"] = $user->societe_id; } + + +top_htmlhead($head, $title, $target); + + print " \n"; -print "
\n"; +print "