Fix: Several fix in vat calculation. Add warning to say deposit invoices are not included.
This commit is contained in:
parent
1f272b0eb4
commit
cec23023d1
@ -23,7 +23,7 @@
|
||||
* \file htdocs/compta/tva/clients.php
|
||||
* \ingroup tax
|
||||
* \brief Page des societes
|
||||
* \version $Id$
|
||||
* \version $Id: clients.php,v 1.31 2011/07/18 11:11:19 eldy Exp $
|
||||
*/
|
||||
|
||||
require('../../main.inc.php');
|
||||
@ -38,7 +38,7 @@ $langs->load("companies");
|
||||
$langs->load("products");
|
||||
|
||||
// Date range
|
||||
$year=$_REQUEST["year"];
|
||||
$year=GETPOST("year");
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
@ -52,24 +52,26 @@ $date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
|
||||
if ($q==0)
|
||||
$q=GETPOST("q");
|
||||
if (empty($q))
|
||||
{
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
|
||||
else $q=1;
|
||||
else
|
||||
{
|
||||
$month_current = strftime("%m",dol_now());
|
||||
if ($month_current >= 10) $q=4;
|
||||
elseif ($month_current >= 7) $q=3;
|
||||
elseif ($month_current >= 4) $q=2;
|
||||
else $q=1;
|
||||
}
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO We define q
|
||||
|
||||
}
|
||||
|
||||
$min = $_REQUEST["min"];
|
||||
$min = GETPOST("min");
|
||||
if (empty($min)) $min = 0;
|
||||
|
||||
// Define modetax (0 or 1)
|
||||
@ -78,7 +80,7 @@ $modetax = $conf->global->TAX_MODE;
|
||||
if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
||||
|
||||
// Security check
|
||||
$socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:'';
|
||||
$socid = GETPOST("socid");
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
@ -104,7 +106,7 @@ $fsearch.='<br>';
|
||||
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
|
||||
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
|
||||
$fsearch.=' '.$langs->trans("SalesTurnover").' '.$langs->trans("Minimum").': ';
|
||||
$fsearch.=' <input type="text" name="min" value="'.$min.'">';
|
||||
$fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
|
||||
|
||||
// Affiche en-tete du rapport
|
||||
if ($modetax==1) // Calculate on invoice for goods and services
|
||||
@ -115,7 +117,8 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
||||
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesVATDue");
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
$description.=$fsearch;
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
@ -137,9 +140,10 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesVATIn");
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
$description.=$fsearch;
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$builddate=time();
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
|
||||
$elementcust=$langs->trans("CustomersInvoices");
|
||||
@ -167,7 +171,7 @@ print "<tr class=\"liste_titre\">";
|
||||
print '<td align="left">'.$langs->trans("Num")."</td>";
|
||||
print '<td align="left">'.$langs->trans("Customer")."</td>";
|
||||
print "<td>".$langs->trans("VATIntra")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("SalesTurnover")." ".$langs->trans("HT")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("AmountHTVATRealReceived")."</td>";
|
||||
print "<td align=\"right\">".$vatcust."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -175,7 +179,7 @@ $coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'sell');
|
||||
if (is_array($coll_list))
|
||||
{
|
||||
$var=true;
|
||||
$total = 0; $subtotal = 0;
|
||||
$total = 0; $totalamount = 0;
|
||||
$i = 1;
|
||||
foreach($coll_list as $coll)
|
||||
{
|
||||
@ -191,10 +195,11 @@ if (is_array($coll_list))
|
||||
}
|
||||
else
|
||||
{
|
||||
$intra = $langs->trans('NotRegistered');
|
||||
//$intra = $langs->trans('NotRegistered');
|
||||
$intra = '';
|
||||
}
|
||||
}
|
||||
print "<tr $bc[$var]>";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td nowrap>".$i."</td>";
|
||||
$company_static->id=$coll->socid;
|
||||
$company_static->nom=$coll->nom;
|
||||
@ -204,13 +209,17 @@ if (is_array($coll_list))
|
||||
print "<td nowrap>".$intra."</td>";
|
||||
print "<td nowrap align=\"right\">".price($coll->amount)."</td>";
|
||||
print "<td nowrap align=\"right\">".price($coll->tva)."</td>";
|
||||
$totalamount = $totalamount + $coll->amount;
|
||||
$total = $total + $coll->tva;
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$x_coll_sum = $total;
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total").':</td><td nowrap align="right"><b>'.price($total).'</b></td>';
|
||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td nowrap align="right">'.price($totalamount).'</td>';
|
||||
print '<td nowrap align="right">'.price($total).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
@ -237,7 +246,7 @@ print "<tr class=\"liste_titre\">";
|
||||
print '<td align="left">'.$langs->trans("Num")."</td>";
|
||||
print '<td align="left">'.$langs->trans("Supplier")."</td>";
|
||||
print "<td>".$langs->trans("VATIntra")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("Outcome")." ".$langs->trans("HT")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("AmountHTVATRealPaid")."</td>";
|
||||
print "<td align=\"right\">".$vatsup."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -247,7 +256,7 @@ $coll_list = vat_by_thirdparty($db,0,$date_start,$date_end,$modetax,'buy');
|
||||
if (is_array($coll_list))
|
||||
{
|
||||
$var=true;
|
||||
$total = 0; $subtotal = 0;
|
||||
$total = 0; $totalamount = 0;
|
||||
$i = 1;
|
||||
foreach($coll_list as $coll)
|
||||
{
|
||||
@ -263,7 +272,8 @@ if (is_array($coll_list))
|
||||
}
|
||||
else
|
||||
{
|
||||
$intra = $langs->trans('NotRegistered');
|
||||
//$intra = $langs->trans('NotRegistered');
|
||||
$intra = '';
|
||||
}
|
||||
}
|
||||
print "<tr $bc[$var]>";
|
||||
@ -276,14 +286,30 @@ if (is_array($coll_list))
|
||||
print "<td nowrap>".$intra."</td>";
|
||||
print "<td nowrap align=\"right\">".price($coll->amount)."</td>";
|
||||
print "<td nowrap align=\"right\">".price($coll->tva)."</td>";
|
||||
$totalamount = $totalamount + $coll->amount;
|
||||
$total = $total + $coll->tva;
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$x_paye_sum = $total;
|
||||
|
||||
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("Total").':</td><td nowrap align="right"><b>'.price($total).'</b></td>';
|
||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").':</td>';
|
||||
print '<td nowrap align="right">'.price($totalamount).'</td>';
|
||||
print '<td nowrap align="right">'.price($total).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
// Total to pay
|
||||
print '<br><br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
$diff = $x_coll_sum - $x_paye_sum;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="4">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
||||
print '<td class="liste_total" nowrap="nowrap" align="right"><b>'.price(price2num($diff,'MT'))."</b></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -301,5 +327,5 @@ print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/18 11:11:19 $ - $Revision: 1.31 $');
|
||||
?>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
* \file htdocs/compta/tva/quadri_detail.php
|
||||
* \ingroup tax
|
||||
* \brief Trimestrial page - detailed version
|
||||
* \version $Id$
|
||||
* \version $Id: quadri_detail.php,v 1.43 2011/07/18 11:11:19 eldy Exp $
|
||||
* \todo Deal with recurrent invoices as well
|
||||
*/
|
||||
|
||||
@ -44,7 +44,7 @@ $langs->load("companies");
|
||||
$langs->load("products");
|
||||
|
||||
// Date range
|
||||
$year=$_REQUEST["year"];
|
||||
$year=GETPOST("year");
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y",dol_now());
|
||||
@ -58,24 +58,26 @@ $date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
|
||||
if ($q==0)
|
||||
$q=GETPOST("q");
|
||||
if (empty($q))
|
||||
{
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
|
||||
else $q=1;
|
||||
else
|
||||
{
|
||||
$month_current = strftime("%m",dol_now());
|
||||
if ($month_current >= 10) $q=4;
|
||||
elseif ($month_current >= 7) $q=3;
|
||||
elseif ($month_current >= 4) $q=2;
|
||||
else $q=1;
|
||||
}
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO We define q
|
||||
|
||||
}
|
||||
|
||||
$min = $_REQUEST["min"];
|
||||
$min = GETPOST("min");
|
||||
if (empty($min)) $min = 0;
|
||||
|
||||
// Define modetax (0 or 1)
|
||||
@ -85,7 +87,7 @@ if (isset($_REQUEST["modetax"])) $modetax=$_REQUEST["modetax"];
|
||||
if (empty($modetax)) $modetax=0;
|
||||
|
||||
// Security check
|
||||
$socid = isset($_REQUEST["socid"])?$_REQUEST["socid"]:'';
|
||||
$socid = GETPOST("socid");
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
@ -134,9 +136,10 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
||||
else { $nextquarter=1; $nextyear++; }
|
||||
//$periodlink=($prevyear?"<a href='".$_SERVER["PHP_SELF"]."?year=".$prevyear."&q=".$prevquarter."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".$nextyear."&q=".$nextquarter."&modetax=".$modetax."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesVATDue");
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
$description.=$fsearch;
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$description.=$fsearch;
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
|
||||
@ -164,7 +167,8 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
//$periodlink=($prevyear?"<a href='".$_SERVER["PHP_SELF"]."?year=".$prevyear."&q=".$prevquarter."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".$nextyear."&q=".$nextquarter."&modetax=".$modetax."'>".img_next()."</a>":"");
|
||||
$description=$langs->trans("RulesVATIn");
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
$description.=$fsearch;
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$builddate=time();
|
||||
//$exportlink=$langs->trans("NotYetAvailable");
|
||||
@ -188,14 +192,10 @@ $vatsup=$langs->trans("VATPaid");
|
||||
|
||||
// VAT Received and paid
|
||||
|
||||
//print "<br>";
|
||||
//print_titre($vatcust);
|
||||
|
||||
echo '<table class="noborder" width="100%">';
|
||||
|
||||
$y = $year_current;
|
||||
$total = 0;
|
||||
$subtotal = 0;
|
||||
$i=0;
|
||||
|
||||
// Load arrays of datas
|
||||
@ -416,21 +416,36 @@ else
|
||||
$x_coll_sum += $temp_vat;
|
||||
}
|
||||
}
|
||||
|
||||
// Total customers
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax == 0)
|
||||
{
|
||||
print '<td nowrap align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num($subtot_coll_total_ht,'MT')).'</td>';
|
||||
print '<td nowrap align="right">'.price(price2num($subtot_coll_vat,'MT')).'</td>';
|
||||
print '</tr>';
|
||||
// Total customers for this vat rate
|
||||
print '<tr class="liste_total">';
|
||||
print '<td></td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax == 0)
|
||||
{
|
||||
print '<td nowrap align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num($subtot_coll_total_ht,'MT')).'</td>';
|
||||
print '<td nowrap align="right">'.price(price2num($subtot_coll_vat,'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if (count($x_coll) == 0) // Show a total ine if nothing shown
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax == 0)
|
||||
{
|
||||
print '<td nowrap align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num(0,'MT')).'</td>';
|
||||
print '<td nowrap align="right">'.price(price2num(0,'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Blank line
|
||||
print '<tr><td colspan="'.($span+1).'"> </td></tr>';
|
||||
|
||||
//print table headers for this quadri - expenses now
|
||||
@ -552,41 +567,51 @@ else
|
||||
$x_paye_sum += $temp_vat;
|
||||
}
|
||||
}
|
||||
|
||||
// Total suppliers
|
||||
print '<tr class="liste_total">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax == 0)
|
||||
{
|
||||
print '<td nowrap align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num($subtot_paye_total_ht,'MT')).'</td>';
|
||||
print '<td nowrap align="right">'.price(price2num($subtot_paye_vat,'MT')).'</td>';
|
||||
print '</tr>';
|
||||
// Total suppliers for this vat rate
|
||||
print '<tr class="liste_total">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax == 0)
|
||||
{
|
||||
print '<td nowrap align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num($subtot_paye_total_ht,'MT')).'</td>';
|
||||
print '<td nowrap align="right">'.price(price2num($subtot_paye_vat,'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr><td colspan="'.($span+1).'"> </td></tr>';
|
||||
if (count($x_paye) == 0) // Show a total ine if nothing shown
|
||||
{
|
||||
print '<tr class="liste_total">';
|
||||
print '<td> </td>';
|
||||
print '<td align="right">'.$langs->trans("Total").':</td>';
|
||||
if ($modetax == 0)
|
||||
{
|
||||
print '<td nowrap align="right"> </td>';
|
||||
print '<td align="right"> </td>';
|
||||
}
|
||||
print '<td align="right">'.price(price2num(0,'MT')).'</td>';
|
||||
print '<td nowrap align="right">'.price(price2num(0,'MT')).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
// Total to pay
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="'.($span-1).'"></td><td class="liste_titre" align="right" colspan="2">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').':</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
$diff = $x_coll_sum - $x_paye_sum;
|
||||
print '<br><br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
$diff = $x_coll_sum - $x_paye_sum;
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="'.$span.'"></td>';
|
||||
print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q?', '.$langs->trans("Quadri").' '.$q:'').'</td>';
|
||||
print '<td class="liste_total" nowrap="nowrap" align="right"><b>'.price(price2num($diff,'MT'))."</b></td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
//print '<tr><td colspan="'.($span+1).'"> </td></tr>'."\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
echo '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooter('$Date: 2011/07/18 11:11:19 $ - $Revision: 1.43 $');
|
||||
?>
|
||||
|
||||
@ -128,3 +128,4 @@ InvoiceRef=Invoice ref.
|
||||
CodeNotDef=Not defined
|
||||
AddRemind=Dispatch available amount
|
||||
RemainToDivide= Remain to dispatch :
|
||||
WarningDepositsNotIncluded=Deposits invoices are not included in this version with this accountancy module.
|
||||
@ -139,4 +139,5 @@ COMPTA_VAT_ACCOUNT=Code comptable par défaut pour TVA (si non défini dans dict
|
||||
COMPTA_ACCOUNT_CUSTOMER=Code comptable client par défaut (si non défini sur fiche tiers)
|
||||
COMPTA_ACCOUNT_SUPPLIER=Code comptable fournisseur par défaut (si non défini sur fiche tiers)
|
||||
AddRemind=Ventiler montant disponible
|
||||
RemainToDivide=Reste à répartir :
|
||||
RemainToDivide=Reste à répartir :
|
||||
WarningDepositsNotIncluded=Les factures d'accomptes ne sont pas encore prises en compte dans cette version avec ce module de comptabilité.
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/lib/tax.lib.php
|
||||
* \ingroup tax
|
||||
* \brief Library for tax module
|
||||
* \version $Id: tax.lib.php,v 1.20 2011/07/04 09:01:37 eldy Exp $
|
||||
* \version $Id: tax.lib.php,v 1.21 2011/07/18 11:11:19 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -142,8 +142,8 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
||||
}
|
||||
|
||||
if (! $sql) return -1;
|
||||
if ($sql && $sql=='TODO') return -2;
|
||||
if ($sql && $sql!='TODO')
|
||||
if ($sql == 'TODO') return -2;
|
||||
if ($sql != 'TODO')
|
||||
{
|
||||
dol_syslog("Tax.lib:thirdparty sql=".$sql);
|
||||
$resql = $db->query($sql);
|
||||
@ -316,8 +316,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
|
||||
//print $sql.'<br>';
|
||||
if (! $sql) return -1;
|
||||
if ($sql && $sql=='TODO') return -2;
|
||||
if ($sql && $sql!='TODO')
|
||||
if ($sql == 'TODO') return -2;
|
||||
if ($sql != 'TODO')
|
||||
{
|
||||
dol_syslog("Tax.lib.php::vat_by_date sql=".$sql);
|
||||
|
||||
@ -477,8 +477,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
dol_syslog("Tax.lib.php::vat_by_date no accountancy module enabled".$sql,LOG_ERR);
|
||||
return -1; // -1 = Not accountancy module enabled
|
||||
}
|
||||
if ($sql && $sql=='TODO') return -2; // -2 = Feature not yet available
|
||||
if ($sql && $sql!='TODO')
|
||||
if ($sql == 'TODO') return -2; // -2 = Feature not yet available
|
||||
if ($sql != 'TODO')
|
||||
{
|
||||
dol_syslog("Tax.lib.php::vat_by_date sql=".$sql);
|
||||
$resql = $db->query($sql);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user