Look: Uniformisation look
This commit is contained in:
parent
993a141e51
commit
2ad207b6ac
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -244,16 +244,16 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
|
||||
|
||||
llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur");
|
||||
|
||||
$html = new Form($db);
|
||||
|
||||
/* *************************************************************************** */
|
||||
/* */
|
||||
/* Mode vue et edition */
|
||||
/* */
|
||||
/* *************************************************************************** */
|
||||
|
||||
llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur");
|
||||
|
||||
$html = new Form($db);
|
||||
|
||||
if ($_GET["id"] > 0)
|
||||
{
|
||||
if ($mesg) print $mesg;
|
||||
@ -578,6 +578,8 @@ if ($_GET["id"] > 0)
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<table width="100%"><tr><td width="50%" valign="top">';
|
||||
|
||||
/*
|
||||
@ -613,6 +615,8 @@ if ($_GET["id"] > 0)
|
||||
$html->show_documents('commande_fournisseur',$comfournref,$filedir,$urlsource,$genallowed,$delallowed,$commande->modelpdf);
|
||||
|
||||
|
||||
print '</td><td width="50%" valign="top">';
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
@ -630,6 +634,7 @@ if ($_GET["id"] > 0)
|
||||
print "</td></tr>";
|
||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Send").'"></td></tr></table></form>';
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
@ -661,6 +666,7 @@ if ($_GET["id"] > 0)
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
|
||||
@ -289,7 +289,13 @@ if ($_GET['action'] == 'create' or $_GET['action'] == 'copy')
|
||||
print '<td align="center"><input type="text" size="8" name="amount'.$i.'" value="'.$value_pu.'"></td>';
|
||||
print '<td align="center"><input type="text" size="3" name="qty'.$i.'" value="'.$value_qty.'"></td>';
|
||||
print '<td align="center">';
|
||||
$html->select_tva('tauxtva'.$i,'', '',$mysoc);
|
||||
$societe='';
|
||||
if ($_GET['socid'])
|
||||
{
|
||||
$societe=new Societe($db);
|
||||
$societe->fetch($_GET['socid']);
|
||||
}
|
||||
$html->select_tva('tauxtva'.$i,'',$societe,$mysoc);
|
||||
print '</td>';
|
||||
print '<td align="center"><input type="text" size="8" name="amountttc'.$i.'" value=""></td></tr>';
|
||||
}
|
||||
|
||||
@ -1501,7 +1501,7 @@ class Form
|
||||
global $langs,$conf,$mysoc;
|
||||
|
||||
//print $societe_vendeuse."-".$societe_acheteuse;
|
||||
if (! $societe_vendeuse->pays_code)
|
||||
if (is_object($societe_vendeuse) && ! $societe_vendeuse->pays_code)
|
||||
{
|
||||
if ($societe_vendeuse->id == $mysoc->id)
|
||||
{
|
||||
@ -1514,10 +1514,19 @@ class Form
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_object($societe_vendeuse->pays_code))
|
||||
{
|
||||
$code_pays=$societe_vendeuse->pays_code;
|
||||
}
|
||||
else
|
||||
{
|
||||
$code_pays=$mysoc->pays_code;
|
||||
}
|
||||
|
||||
// Recherche liste des codes TVA du pays vendeur
|
||||
$sql = "SELECT t.taux,t.recuperableonly";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva AS t";
|
||||
$sql .= " WHERE t.fk_pays = '".$societe_vendeuse->pays_code."'";
|
||||
$sql .= " WHERE t.fk_pays = '".$code_pays."'";
|
||||
$sql .= " AND t.active = 1";
|
||||
$sql .= " ORDER BY t.taux ASC, t.recuperableonly ASC";
|
||||
|
||||
@ -1532,6 +1541,10 @@ class Form
|
||||
$libtva[ $i ] = $obj->taux.'%'.($obj->recuperableonly ? ' *':'');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<font class="error">'.$langs->trans("ErrorNoVATRateDefinedForSellerCountry").'</div>';
|
||||
}
|
||||
|
||||
// Définition du taux à présélectionner
|
||||
if ($defaulttx == '') $defaulttx=get_default_tva($societe_vendeuse,$societe_acheteuse,$taux_produit);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user