Fix: [ bug #409 ] List of vat rates for supplier prices must use the
seller country. Conflicts: htdocs/install/mysql/migration/3.1.0-3.2.0.sql htdocs/product/fournisseurs.php
This commit is contained in:
parent
c1b1dcc5e7
commit
ed48969630
@ -450,3 +450,5 @@ ALTER TABLE llx_commande_fournisseur ADD COLUMN extraparams varchar(255) AFTER i
|
|||||||
ALTER TABLE llx_facture_fourn ADD COLUMN extraparams varchar(255) AFTER import_key;
|
ALTER TABLE llx_facture_fourn ADD COLUMN extraparams varchar(255) AFTER import_key;
|
||||||
|
|
||||||
ALTER TABLE llx_boxes ADD COLUMN maxline integer NULL;
|
ALTER TABLE llx_boxes ADD COLUMN maxline integer NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_product_fournisseur_price MODIFY fk_product_fournisseur integer DEFAULT 0;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -92,7 +92,7 @@ if ($action == 'updateprice' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
|||||||
$ref_fourn=GETPOST("ref_fourn");
|
$ref_fourn=GETPOST("ref_fourn");
|
||||||
if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn");
|
if (empty($ref_fourn)) $ref_fourn=GETPOST("search_ref_fourn");
|
||||||
$quantity=GETPOST("qty");
|
$quantity=GETPOST("qty");
|
||||||
$tva_tx=GETPOST('tva_tx','alpha');
|
$tva_tx=price2num(GETPOST('tva_tx','alpha'));
|
||||||
|
|
||||||
if (empty($quantity))
|
if (empty($quantity))
|
||||||
{
|
{
|
||||||
@ -299,14 +299,17 @@ if ($id || $ref)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input class="flat" name="ref_fourn" size="12" value="'.($_POST["ref_fourn"]?$_POST["ref_fourn"]:'').'">';
|
print '<input class="flat" name="ref_fourn" size="12" value="'.(GETPOST("ref_fourn")?GETPOST("ref_fourn"):'').'">';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Vat rate
|
// Vat rate
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("VATRate").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("VATRate").'</td>';
|
||||||
print '<td colspan="3">'.$form->load_tva('tva_tx',$product->tva_tx,$supplier,$mysoc).'</td></tr>';
|
print '<td colspan="3">';
|
||||||
|
//print $form->load_tva('tva_tx',$product->tva_tx,$supplier,$mysoc); // Do not use list here as it may be any vat rates for any country
|
||||||
|
print '<input type="text" class="flat" size="5" name="tva_tx" value="'.vatrate(GETPOST("tva_tx")?GETPOST("tva_tx"):$product->tva_tx).'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Availability
|
// Availability
|
||||||
if (! empty($conf->global->FOURN_PRODUCT_AVAILABILITY))
|
if (! empty($conf->global->FOURN_PRODUCT_AVAILABILITY))
|
||||||
@ -424,6 +427,7 @@ if ($id || $ref)
|
|||||||
// VAT rate
|
// VAT rate
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
print vatrate($productfourn->fourn_tva_tx,true);
|
print vatrate($productfourn->fourn_tva_tx,true);
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Price quantity
|
// Price quantity
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user