New : 2178 Additional Tax : input in purchase and sale ledger
- tax with positive amount - tax with negative amount - tax in currency
This commit is contained in:
parent
c4645e68e1
commit
7256f1464d
12 changed files with 658 additions and 27 deletions
|
|
@ -2,6 +2,7 @@
|
|||
//This file is part of NOALYSS and is under GPL
|
||||
//see licence.txt
|
||||
$str_anc="";
|
||||
global $div,$g_parameter,$cn,$access,$jr_id,$obj;
|
||||
?><?php require_once NOALYSS_TEMPLATE.'/ledger_detail_top.php'; ?>
|
||||
<div class="content" style="padding:0;">
|
||||
<?php
|
||||
|
|
@ -115,6 +116,9 @@ $str_anc="";
|
|||
$total_tvac = 0;
|
||||
echo th(_('Quick Code'));
|
||||
echo th(_('Description'));
|
||||
|
||||
echo th(_('Prix/Un.'), 'style="text-align:right"');
|
||||
echo th(_('Quantité'), 'style="text-align:right"');
|
||||
if ($owner->MY_TVA_USE == 'Y')
|
||||
{
|
||||
echo th(_('Taux TVA'), 'style="text-align:right"');
|
||||
|
|
@ -122,8 +126,6 @@ $str_anc="";
|
|||
{
|
||||
echo th('');
|
||||
}
|
||||
echo th(_('Prix/Un.'), 'style="text-align:right"');
|
||||
echo th(_('Quantité'), 'style="text-align:right"');
|
||||
echo th(_('Non ded'), 'style="text-align:right"');
|
||||
|
||||
if ($owner->MY_TVA_USE == 'Y')
|
||||
|
|
@ -194,10 +196,10 @@ $str_anc="";
|
|||
$input->value = $fiche->strAttribut(ATTR_DEF_NAME);
|
||||
}
|
||||
$row.=td($input->input() . $hidden);
|
||||
$row.=td($sym_tva, 'style="text-align:center"');
|
||||
$pu = $q['qp_unit'];
|
||||
$row.=td(nbm($pu,4), 'class="num"');
|
||||
$row.=td(nbm($q['qp_quantite'],4), 'class="num"');
|
||||
$row.=td($sym_tva, 'style="text-align:center"');
|
||||
|
||||
$no_ded = bcadd($q['qp_dep_priv'], $q['qp_nd_amount']);
|
||||
$row.=td(nbm($no_ded), ' style="text-align:right"');
|
||||
|
|
@ -257,14 +259,30 @@ $str_anc="";
|
|||
}
|
||||
echo tr($row,$class);
|
||||
}
|
||||
|
||||
if ($owner->MY_TVA_USE == 'Y')
|
||||
$row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
|
||||
else
|
||||
$row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"');
|
||||
/**
|
||||
* display additional tax if any + currency
|
||||
*/
|
||||
$sum_add_tax=0;$sum_add_tax_cur=0;
|
||||
Additional_Tax::display_row($jr_id,$sum_add_tax,$sum_add_tax_cur,2);
|
||||
$sum_charge_euro=bcadd($sum_charge_euro,$sum_add_tax_cur);
|
||||
|
||||
$total_tvac=bcadd($sum_add_tax,$total_tvac);
|
||||
if ($owner->MY_TVA_USE == 'N') {
|
||||
$total_htva=bcadd($sum_add_tax,$total_htva);
|
||||
}
|
||||
$row.=td(nbm($total_htva), 'class="num" style="font-style:italic;font-weight: bolder;"');
|
||||
if ($owner->MY_TVA_USE == 'Y')
|
||||
$row.=td("") . td("").td(nbm($total_tvac), 'class="num" style="font-style:italic;font-weight: bolder;"');
|
||||
|
||||
/**
|
||||
* display additional tax if any + currency
|
||||
*/
|
||||
|
||||
|
||||
//Display total in currency
|
||||
if ( $obj->det->currency_id != "" && $obj->det->currency_id > 0)
|
||||
{
|
||||
|
|
@ -276,6 +294,8 @@ $str_anc="";
|
|||
?>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
|
||||
/*
|
||||
* Info about currency if not in euro
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
<?php
|
||||
//This file is part of NOALYSS and is under GPL
|
||||
//see licence.txt
|
||||
?><?php require_once NOALYSS_TEMPLATE.'/ledger_detail_top.php'; ?>
|
||||
global $div,$g_parameter,$cn,$access,$jr_id,$obj;
|
||||
?>
|
||||
|
||||
<?php require_once NOALYSS_TEMPLATE.'/ledger_detail_top.php'; ?>
|
||||
<?php
|
||||
$tab_account=$div."account";
|
||||
$tab_rapprochement=$div."rapproch";
|
||||
|
|
@ -9,7 +12,7 @@
|
|||
$tab_document=$div."document";
|
||||
$str_anc="";
|
||||
?>
|
||||
<div class="content" style="padding:0;">
|
||||
<div class="content" style="padding:0px;">
|
||||
<?php
|
||||
$owner = new Noalyss_Parameter_Folder($cn);
|
||||
?>
|
||||
|
|
@ -266,12 +269,24 @@ echo $ipaid->input();
|
|||
$row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"');
|
||||
else
|
||||
$row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"');
|
||||
/**
|
||||
* display additional tax if any + currency
|
||||
*/
|
||||
$sum_add_tax=0;$sum_add_tax_cur=0;
|
||||
Additional_Tax::display_row($jr_id,$sum_add_tax,$sum_add_tax_cur);
|
||||
$sum_prod_currency=bcadd($sum_prod_currency,$sum_add_tax_cur);
|
||||
|
||||
$total_tvac=bcadd($sum_add_tax,$total_tvac);
|
||||
if ($owner->MY_TVA_USE == 'N') {
|
||||
$total_htva=bcadd($sum_add_tax,$total_htva);
|
||||
}
|
||||
$row.=td(nbm($total_htva), 'class="num" style="font-style:italic;font-weight: bolder;"');
|
||||
if ($owner->MY_TVA_USE == 'Y')
|
||||
if ($owner->MY_TVA_USE == 'Y') {
|
||||
$row.=td("") . td(nbm($total_tvac), 'class="num" style="font-style:italic;font-weight: bolder;"');
|
||||
|
||||
|
||||
//Display total in currency
|
||||
|
||||
}
|
||||
|
||||
//Display total in currency
|
||||
if ( $obj->det->currency_id != "" && $obj->det->currency_id > 0)
|
||||
{
|
||||
$row.= td(nbm($sum_prod_currency,4),' class="num" style="font-style:italic;font-weight: bolder;"');
|
||||
|
|
@ -279,7 +294,7 @@ echo $ipaid->input();
|
|||
echo tr($row);
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
@ -300,7 +315,9 @@ echo $ipaid->input();
|
|||
echo _("Taux Réf"), " ",nbm($obj->det->currency_rate_ref,4).$four_space;
|
||||
echo _("Montant en devise"), " ",nbm($sum_prod_currency,4).$four_space;
|
||||
}
|
||||
?>
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
require_once NOALYSS_TEMPLATE.'/ledger_detail_bottom.php';
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue