Fix: Misc fix. Bad links. Missing label.
This commit is contained in:
parent
4a94b454a6
commit
e20e67968d
@ -305,12 +305,14 @@ class ChargeSociales extends CommonObject
|
||||
|
||||
$result='';
|
||||
|
||||
if (empty($this->ref)) $this->ref=$this->lib;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowSocialContribution"),'bill').$lienfin.' ');
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowSocialContribution").': '.$this->lib,'bill').$lienfin.' ');
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->lib,$maxlen):$this->lib).$lienfin;
|
||||
if ($withpicto != 2) $result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -28,6 +28,8 @@
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/chargesociales.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/lib/date.lib.php");
|
||||
|
||||
$langs->load("compta");
|
||||
|
||||
@ -45,6 +47,8 @@ if (! $year) { $year=date("Y", time()); }
|
||||
* View
|
||||
*/
|
||||
|
||||
$tva_static = new Tva($db);
|
||||
|
||||
llxHeader('',$langs->trans("TaxAndDividendsArea"));
|
||||
|
||||
print_fiche_titre($langs->trans("TaxAndDividendsArea"),($year?"<a href='index.php?year=".($year-1)."'>".img_previous()."</a> ".$langs->trans("Year")." $year <a href='index.php?year=".($year+1)."'>".img_next()."</a>":""));
|
||||
@ -62,7 +66,7 @@ print '<td width="120">'.$langs->trans("PeriodEndDate").'</td>';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print "<td>".$langs->trans("Type")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("Amount")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("NbOfPayments")."</td>";
|
||||
print "<td align=\"center\">".$langs->trans("NbOfPayments")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("AlreadyPaid")."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
@ -108,11 +112,11 @@ if ($resql)
|
||||
$socialcontrib=new ChargeSociales($db);
|
||||
$socialcontrib->id=$obj->rowid;
|
||||
$socialcontrib->lib=$obj->libelle;
|
||||
print $socialcontrib->getNomUrl(1,'16');
|
||||
print $socialcontrib->getNomUrl(1,'20');
|
||||
print '</td>';
|
||||
print '<td><a href="../sociales/index.php?filtre=s.fk_type:'.$obj->type.'">'.$obj->lib.'</a></td>';
|
||||
print '<td align="right">'.price($obj->total).'</td>';
|
||||
print '<td align="right">'.$obj->nb.'</td>';
|
||||
print '<td align="center">'.$obj->nb.'</td>';
|
||||
print '<td align="right">'.price($obj->totalpaye).'</td>';
|
||||
print '</tr>';
|
||||
$total = $total + $obj->total;
|
||||
@ -121,9 +125,9 @@ if ($resql)
|
||||
$i++;
|
||||
}
|
||||
print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right"><b>'.price($total)."</b></td>";
|
||||
print '<td align="right"><b>'.$totalnb.'</b></td>';
|
||||
print '<td align="right"><b>'.price($totalpaye)."</b></td>";
|
||||
print '<td align="right" width="10%"><b>'.price($total)."</b></td>";
|
||||
print '<td align="center" width="15%"><b>'.$totalnb.'</b></td>';
|
||||
print '<td align="right" width="10%"><b>'.price($totalpaye)."</b></td>";
|
||||
print "</tr>";
|
||||
}
|
||||
else
|
||||
@ -143,14 +147,14 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
|
||||
|
||||
print_titre($langs->trans("VATPayments"));
|
||||
|
||||
$sql = "SELECT f.rowid, f.amount, f.label, ".$db->pdate("f.datev")." as dm";
|
||||
$sql = "SELECT f.rowid, f.amount, f.label, f.datev as dm";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."tva as f ";
|
||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||
if ($year > 0)
|
||||
{
|
||||
// Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance,
|
||||
// ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire
|
||||
$sql.= " AND date_format(f.datev, '%Y') = ".$year;
|
||||
$sql.= " AND f.datev between '".$db->idate(dol_get_first_day($year,1))."' AND '".$db->idate(dol_get_last_day($year,12))."'";
|
||||
}
|
||||
$sql.= " ORDER BY dm DESC";
|
||||
|
||||
@ -164,22 +168,27 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="120" nowrap="nowrap">'.$langs->trans("PeriodEndDate").'</td>';
|
||||
print "<td>".$langs->trans("Label")."</td>";
|
||||
print '<td align="right">'.$langs->trans("Amount")."</td>";
|
||||
print '<td align="center">'.$langs->trans("DatePayment")."</td>";
|
||||
print "<td align=\"right\">".$langs->trans("AlreadyPaid")."</td>";
|
||||
print '<td align="right" width="10%">'.$langs->trans("Amount")."</td>";
|
||||
print '<td align="center" width="15%">'.$langs->trans("DatePayment")."</td>";
|
||||
print '<td align="right" width="10%">'.$langs->trans("AlreadyPaid")."</td>";
|
||||
print "</tr>\n";
|
||||
$var=1;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td align="left">'.dol_print_date($obj->dm,'day').' ? </td>'."\n";
|
||||
print "<td>".$obj->label."</td>\n";
|
||||
|
||||
$total = $total + $obj->amount;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td align="left">'.dol_print_date($db->jdate($obj->dm),'day').' ? </td>'."\n";
|
||||
|
||||
$tva_static->id=$obj->rowid;
|
||||
$tva_static->ref=$obj->label;
|
||||
print "<td>".$tva_static->getNomUrl(1)."</td>\n";
|
||||
|
||||
print "<td align=\"right\">".price($obj->amount)."</td>";
|
||||
print '<td align="center">'.dol_print_date($obj->dm,'day')."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dm),'day')."</td>\n";
|
||||
print "<td align=\"right\">".price($obj->amount)."</td>";
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/compta/tva/fiche.php
|
||||
* \ingroup tax
|
||||
* \brief Page des r<EFBFBD>glements de TVA
|
||||
* \brief Page of VAT payments
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
@ -48,12 +48,12 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
{
|
||||
$tva = new Tva($db);
|
||||
|
||||
|
||||
$db->begin();
|
||||
|
||||
|
||||
$datev=dol_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]);
|
||||
$datep=dol_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]);
|
||||
|
||||
|
||||
$tva->accountid=$_POST["accountid"];
|
||||
$tva->paymenttype=$_POST["paiementtype"];
|
||||
$tva->datev=$datev;
|
||||
@ -80,11 +80,11 @@ if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$tva = new Tva($db);
|
||||
$result=$tva->fetch($_GET['id']);
|
||||
|
||||
|
||||
if ($tva->rappro == 0)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
|
||||
$ret=$tva->delete($user);
|
||||
if ($ret > 0)
|
||||
{
|
||||
@ -94,7 +94,7 @@ if ($_GET["action"] == 'delete')
|
||||
$result=$accountline->fetch($tva->fk_bank);
|
||||
$result=$accountline->delete($user);
|
||||
}
|
||||
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
@ -146,13 +146,13 @@ if ($_GET["action"] == 'create')
|
||||
print "<form name='add' action=\"fiche.php\" method=\"post\">\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
|
||||
print_fiche_titre($langs->trans("NewVATPayment"));
|
||||
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("DatePayment").'</td><td>';
|
||||
print $html->select_date($datep,"datep",'','','','add');
|
||||
@ -163,10 +163,10 @@ if ($_GET["action"] == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.($_POST["label"]?$_POST["label"]:$langs->trans("VATPayment")).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.($_POST["label"]?$_POST["label"]:$langs->trans("VATPayment")).'"></td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
@ -178,18 +178,18 @@ if ($_GET["action"] == 'create')
|
||||
$html->select_types_paiements($_POST["paiementtype"], "paiementtype");
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td> </td><td><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* */
|
||||
/* Barre d'action */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($id)
|
||||
@ -202,11 +202,11 @@ if ($id)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, 'card', $langs->trans("VATPayment"));
|
||||
dol_fiche_head($head, 'card', $langs->trans("VATPayment"), 0, 'payment');
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
print "<tr>";
|
||||
print '<td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $vatpayment->ref;
|
||||
@ -222,7 +222,7 @@ if ($id)
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</td></tr>';
|
||||
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
if ($vatpayment->fk_account > 0)
|
||||
@ -233,16 +233,16 @@ if ($id)
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
/*
|
||||
* Boutons d'actions
|
||||
*/
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* \file htdocs/compta/tva/reglement.php
|
||||
* \ingroup tax
|
||||
* \brief Liste des r<EFBFBD>glements de TVA effectu<EFBFBD>s
|
||||
* \brief List of VAT payments
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ DatePayment=Date de réglement
|
||||
NewVATPayment=Nouveau réglement de TVA
|
||||
VATPayment=Réglement TVA
|
||||
VATPayments=Réglements TVA
|
||||
ShowVatPayment=Affiche payment TVA
|
||||
ShowVatPayment=Affiche paiement TVA
|
||||
TotalToPay=Total à payer
|
||||
TotalVATReceived=Total TVA perçue
|
||||
CustomerAccountancyCode=Code compta client
|
||||
|
||||
Loading…
Reference in New Issue
Block a user