[ task #1060 ] Register fields localtax(1|2)_type into details tables
This commit is contained in:
parent
e0ec92c843
commit
4c7907b773
@ -53,6 +53,7 @@ For users:
|
|||||||
- New: User permissions on margin module
|
- New: User permissions on margin module
|
||||||
- New: Add ref supplier into muscadet model
|
- New: Add ref supplier into muscadet model
|
||||||
- New: Can use tag {mm} before {yy} even when there is a reset into numbering masks.
|
- New: Can use tag {mm} before {yy} even when there is a reset into numbering masks.
|
||||||
|
- New: [ task #1060 ] Register fields localtax(1|2)_type into details tables
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Qual: Normalized sort order of all languages files with english reference files.
|
- Qual: Normalized sort order of all languages files with english reference files.
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -377,11 +377,14 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
$vatrate=(string) $object->lines[$i]->tva_tx;
|
$vatrate=(string) $object->lines[$i]->tva_tx;
|
||||||
|
|
||||||
// TODO : store local taxes types into object lines and remove this
|
// Retrieve type from database for backward compatibility with old records
|
||||||
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined
|
||||||
if ((! isset($localtax1_type)) || $localtax1_type=='') $localtax1_type = $localtaxtmp_array[0];
|
&& (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax
|
||||||
if ((! isset($localtax2_type)) || $localtax2_type=='') $localtax2_type = $localtaxtmp_array[2];
|
{
|
||||||
//end TODO
|
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
||||||
|
$localtax1_type = $localtaxtmp_array[0];
|
||||||
|
$localtax2_type = $localtaxtmp_array[2];
|
||||||
|
}
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type && $localtax1ligne != 0)
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -377,11 +377,14 @@ class pdf_proforma extends ModelePDFCommandes
|
|||||||
|
|
||||||
$vatrate=(string) $object->lines[$i]->tva_tx;
|
$vatrate=(string) $object->lines[$i]->tva_tx;
|
||||||
|
|
||||||
// TODO : store local taxes types into object lines and remove this
|
// Retrieve type from database for backward compatibility with old records
|
||||||
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined
|
||||||
if ((! isset($localtax1_type)) || $localtax1_type=='') $localtax1_type = $localtaxtmp_array[0];
|
&& (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax
|
||||||
if ((! isset($localtax2_type)) || $localtax2_type=='') $localtax2_type = $localtaxtmp_array[2];
|
{
|
||||||
//end TODO
|
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
||||||
|
$localtax1_type = $localtaxtmp_array[0];
|
||||||
|
$localtax2_type = $localtaxtmp_array[2];
|
||||||
|
}
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type && $localtax1ligne != 0)
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -379,11 +379,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
$vatrate=(string) $object->lines[$i]->tva_tx;
|
$vatrate=(string) $object->lines[$i]->tva_tx;
|
||||||
|
|
||||||
// TODO : store local taxes types into object lines and remove this
|
// Retrieve type from database for backward compatibility with old records
|
||||||
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined
|
||||||
if ((! isset($localtax1_type)) || $localtax1_type=='') $localtax1_type = $localtaxtmp_array[0];
|
&& (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax
|
||||||
if ((! isset($localtax2_type)) || $localtax2_type=='') $localtax2_type = $localtaxtmp_array[2];
|
{
|
||||||
//end TODO
|
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
||||||
|
$localtax1_type = $localtaxtmp_array[0];
|
||||||
|
$localtax2_type = $localtaxtmp_array[2];
|
||||||
|
}
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type && $localtax1ligne != 0)
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -432,11 +432,14 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$vatrate=(string) $object->lines[$i]->tva_tx;
|
$vatrate=(string) $object->lines[$i]->tva_tx;
|
||||||
|
|
||||||
// TODO : store local taxes types into object lines and remove this
|
// Retrieve type from database for backward compatibility with old records
|
||||||
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined
|
||||||
if ((! isset($localtax1_type)) || $localtax1_type=='') $localtax1_type = $localtaxtmp_array[0];
|
&& (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax
|
||||||
if ((! isset($localtax2_type)) || $localtax2_type=='') $localtax2_type = $localtaxtmp_array[2];
|
{
|
||||||
//end TODO
|
$localtaxtmp_array=getLocalTaxesFromRate($vatrate,0,$mysoc);
|
||||||
|
$localtax1_type = $localtaxtmp_array[0];
|
||||||
|
$localtax2_type = $localtaxtmp_array[2];
|
||||||
|
}
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type && $localtax1ligne != 0)
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user