Little refactor
This commit is contained in:
parent
7163ee55f7
commit
54dd1763fe
@ -57,17 +57,17 @@ function societe_prepare_head(Societe $object)
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client==1 || $object->client==3)) $head[$h][1] .= $langs->trans("Customer");
|
||||
$head[$h][2] = 'customer';
|
||||
$h++;
|
||||
}
|
||||
if (($object->client==1 || $object->client==2 || $object->client==3) && (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)))
|
||||
{
|
||||
$langs->load("products");
|
||||
// price
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("CustomerPrices");
|
||||
$head[$h][2] = 'price';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||
{
|
||||
$langs->load("products");
|
||||
// price
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("CustomerPrices");
|
||||
$head[$h][2] = 'price';
|
||||
$h++;
|
||||
}
|
||||
}
|
||||
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id;
|
||||
|
||||
@ -3929,13 +3929,10 @@ function get_product_localtax_for_country($idprod, $local, $thirdparty_seller)
|
||||
* @return float Taux de tva a appliquer, -1 si ne peut etre determine
|
||||
* @see get_default_npr, get_default_localtax
|
||||
*/
|
||||
function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
|
||||
function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (!is_object($thirdparty_seller)) return -1;
|
||||
if (!is_object($thirdparty_buyer)) return -1;
|
||||
|
||||
// Note: possible values for tva_assuj are 0/1 or franchise/reel
|
||||
$seller_use_vat=((is_numeric($thirdparty_seller->tva_assuj) && ! $thirdparty_seller->tva_assuj) || (! is_numeric($thirdparty_seller->tva_assuj) && $thirdparty_seller->tva_assuj=='franchise'))?0:1;
|
||||
|
||||
@ -4012,7 +4009,7 @@ function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idpr
|
||||
* @return float 0 or 1
|
||||
* @see get_default_tva, get_default_localtax
|
||||
*/
|
||||
function get_default_npr($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
|
||||
function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod=0, $idprodfournprice=0)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user