New: Added a link to vat payment on bank transaction view for vat payment.
This commit is contained in:
parent
1880373019
commit
c7569e6316
@ -43,7 +43,7 @@ class Account extends CommonObject
|
|||||||
var $rowid;
|
var $rowid;
|
||||||
var $ref;
|
var $ref;
|
||||||
var $label;
|
var $label;
|
||||||
var $type;
|
var $type; // 'payment', 'company', 'member', 'banktransfert', 'payment_supplier', 'sc', 'payment_vat', ...
|
||||||
var $bank;
|
var $bank;
|
||||||
var $clos;
|
var $clos;
|
||||||
var $rappro;
|
var $rappro;
|
||||||
@ -97,13 +97,13 @@ class Account extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Ajoute lien entre ecriture bancaire et sources
|
* Add a link between bank line record and its source
|
||||||
* \param line_id Id ecriture bancaire
|
* @param line_id Id ecriture bancaire
|
||||||
* \param url_id Id parametre url
|
* @param url_id Id parametre url
|
||||||
* \param url Url
|
* @param url Url
|
||||||
* \param label Libell<EFBFBD> du lien
|
* @param label Link label
|
||||||
* \param type Type de lien (payment, company, member, ...)
|
* @param type Type of link ('payment', 'company', 'member', ...)
|
||||||
* \return int <0 si ko, id line si ok
|
* @return int <0 if KO, id line if OK
|
||||||
*/
|
*/
|
||||||
function add_url_line($line_id, $url_id, $url, $label, $type)
|
function add_url_line($line_id, $url_id, $url, $label, $type)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -21,11 +21,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/bank/account.php
|
* \file htdocs/compta/bank/account.php
|
||||||
\ingroup banque
|
* \ingroup banque
|
||||||
\brief Page de détail des transactions bancaires
|
* \brief Page de détail des transactions bancaires
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/bank.lib.php");
|
||||||
@ -33,6 +33,7 @@ require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/chargesociales.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/chargesociales.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/paiement.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/fourn/facture/paiementfourn.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/fourn/facture/paiementfourn.class.php");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -121,6 +122,7 @@ $chargestatic=new ChargeSociales($db);
|
|||||||
$memberstatic=new Adherent($db);
|
$memberstatic=new Adherent($db);
|
||||||
$paymentstatic=new Paiement($db);
|
$paymentstatic=new Paiement($db);
|
||||||
$paymentsupplierstatic=new PaiementFourn($db);
|
$paymentsupplierstatic=new PaiementFourn($db);
|
||||||
|
$paymentvatstatic=new TVA($db);
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
@ -427,9 +429,8 @@ if ($account || $_GET["ref"])
|
|||||||
}
|
}
|
||||||
if ($mode_search && $conf->tax->enabled)
|
if ($mode_search && $conf->tax->enabled)
|
||||||
{
|
{
|
||||||
// \TODO Mettre jointure sur charges sociales pour recherche sur une charge
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND bu.type='payment_vat'";
|
||||||
//$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND bu.type='company'";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."tva as t ON bu.url_id = t.rowid";
|
||||||
//$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid";
|
|
||||||
}
|
}
|
||||||
$sql.= " WHERE fk_account=".$acct->id;
|
$sql.= " WHERE fk_account=".$acct->id;
|
||||||
$sql.= $sql_rech;
|
$sql.= $sql_rech;
|
||||||
@ -503,18 +504,19 @@ if ($account || $_GET["ref"])
|
|||||||
foreach($links as $key=>$val)
|
foreach($links as $key=>$val)
|
||||||
{
|
{
|
||||||
if ($links[$key]['type']=='payment') {
|
if ($links[$key]['type']=='payment') {
|
||||||
$paymentstatic->rowid=$links[$key]['url_id'];
|
$paymentstatic->id=$links[$key]['url_id'];
|
||||||
print ' '.$paymentstatic->getNomUrl(2);
|
print ' '.$paymentstatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='payment_supplier') {
|
else if ($links[$key]['type']=='payment_supplier') {
|
||||||
|
$paymentsupplierstatic->id=$links[$key]['url_id'];
|
||||||
$paymentsupplierstatic->rowid=$links[$key]['url_id'];
|
$paymentsupplierstatic->ref=$links[$key]['url_id'];
|
||||||
print ' '.$paymentsupplierstatic->getNomUrl(2);
|
print ' '.$paymentsupplierstatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='company') {
|
else if ($links[$key]['type']=='company') {
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='sc') { // This is waiting for card to link to payment_sc
|
else if ($links[$key]['type']=='sc') { // This is waiting for card to link to payment_sc
|
||||||
$chargestatic->id=$links[$key]['url_id'];
|
$chargestatic->id=$links[$key]['url_id'];
|
||||||
|
$chargestatic->ref=$links[$key]['url_id'];
|
||||||
print ' '.$chargestatic->getNomUrl(2);
|
print ' '.$chargestatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='payment_sc')
|
else if ($links[$key]['type']=='payment_sc')
|
||||||
@ -527,6 +529,12 @@ if ($account || $_GET["ref"])
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
else if ($links[$key]['type']=='payment_vat')
|
||||||
|
{
|
||||||
|
$paymentvatstatic->id=$links[$key]['url_id'];
|
||||||
|
$paymentvatstatic->ref=$links[$key]['url_id'];
|
||||||
|
print ' '.$paymentvatstatic->getNomUrl(2);
|
||||||
|
}
|
||||||
else if ($links[$key]['type']=='banktransfert') {
|
else if ($links[$key]['type']=='banktransfert') {
|
||||||
/* Do not show this link (avoid confusion). Can already be accessed from transaction detail */
|
/* Do not show this link (avoid confusion). Can already be accessed from transaction detail */
|
||||||
}
|
}
|
||||||
@ -551,9 +559,7 @@ if ($account || $_GET["ref"])
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|
||||||
/*
|
// Add third party column
|
||||||
* Ajout les liens tiers
|
|
||||||
*/
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
foreach($links as $key=>$val)
|
foreach($links as $key=>$val)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,6 +32,7 @@ if (! $user->rights->banque->lire && ! $user->rights->banque->consolidate)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
|
$langs->load("compta");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
if ($conf->adherent->enabled) $langs->load("members");
|
if ($conf->adherent->enabled) $langs->load("members");
|
||||||
@ -311,7 +312,7 @@ if ($result)
|
|||||||
print '<input name="label" class="flat" value="';
|
print '<input name="label" class="flat" value="';
|
||||||
if (eregi('^\((.*)\)$',$objp->label,$reg))
|
if (eregi('^\((.*)\)$',$objp->label,$reg))
|
||||||
{
|
{
|
||||||
// Label g<EFBFBD>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant
|
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||||
print $langs->trans($reg[1]);
|
print $langs->trans($reg[1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -327,7 +328,7 @@ if ($result)
|
|||||||
print '<td colspan="4">';
|
print '<td colspan="4">';
|
||||||
if (eregi('^\((.*)\)$',$objp->label,$reg))
|
if (eregi('^\((.*)\)$',$objp->label,$reg))
|
||||||
{
|
{
|
||||||
// Label g<EFBFBD>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant
|
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||||
print $langs->trans($reg[1]);
|
print $langs->trans($reg[1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -375,6 +376,12 @@ if ($result)
|
|||||||
print $langs->trans("SocialContributionPayment");
|
print $langs->trans("SocialContributionPayment");
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
|
else if ($links[$key]['type']=='payment_vat') {
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/compta/tva/fiche.php?id='.$links[$key]['url_id'].'">';
|
||||||
|
print img_object($langs->trans('ShowVAT'),'payment').' ';
|
||||||
|
print $langs->trans("VATPayment");
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
else if ($links[$key]['type']=='member') {
|
else if ($links[$key]['type']=='member') {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/adherents/fiche.php?rowid='.$links[$key]['url_id'].'">';
|
print '<a href="'.DOL_URL_ROOT.'/adherents/fiche.php?rowid='.$links[$key]['url_id'].'">';
|
||||||
print img_object($langs->trans('ShowMember'),'user').' ';
|
print img_object($langs->trans('ShowMember'),'user').' ';
|
||||||
|
|||||||
@ -223,7 +223,7 @@ if ($resql)
|
|||||||
// Date value
|
// Date value
|
||||||
if (! $objp->rappro && ($user->rights->banque->modifier || $user->rights->banque->consolidate))
|
if (! $objp->rappro && ($user->rights->banque->modifier || $user->rights->banque->consolidate))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center" nowrap="nowrap">';
|
||||||
print dolibarr_print_date($objp->dv,"day");
|
print dolibarr_print_date($objp->dv,"day");
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||||
|
|||||||
@ -92,8 +92,8 @@ if ($_POST["action"] == "builddoc" && $user->rights->facture->lire)
|
|||||||
create_exdir($diroutputpdf);
|
create_exdir($diroutputpdf);
|
||||||
|
|
||||||
// enregistre le fichier pdf concatene
|
// enregistre le fichier pdf concatene
|
||||||
$filename=sanitizeFileName(strtolower($langs->transnoentities("Unpayed")));
|
$filename=strtolower(sanitizeFileName($langs->transnoentities("Unpayed")));
|
||||||
if ($option=='late') $filename.='_'.sanitizeFileName(strtolower($langs->transnoentities("Late")));
|
if ($option=='late') $filename.='_'.strtolower(sanitizeFileName($langs->transnoentities("Late")));
|
||||||
if ($pagecount)
|
if ($pagecount)
|
||||||
{
|
{
|
||||||
$file=$diroutputpdf.'/'.$filename.'_'.dolibarr_print_date(mktime(),'dayhourlog').'.pdf';
|
$file=$diroutputpdf.'/'.$filename.'_'.dolibarr_print_date(mktime(),'dayhourlog').'.pdf';
|
||||||
|
|||||||
@ -128,7 +128,7 @@ $head[$h][1] = $langs->trans("Info");
|
|||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Payment"));
|
dolibarr_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression du paiement
|
* Confirmation de la suppression du paiement
|
||||||
|
|||||||
@ -55,7 +55,7 @@ $hselected = $h;
|
|||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Payment"));
|
dolibarr_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"));
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
|||||||
@ -18,11 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/paiement/liste.php
|
* \file htdocs/compta/paiement/liste.php
|
||||||
\ingroup compta
|
* \ingroup compta
|
||||||
\brief Page liste des paiements des factures clients
|
* \brief Page liste des paiements des factures clients
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
||||||
@ -154,7 +154,8 @@ if ($resql)
|
|||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
print '<td width="40">';
|
print '<td width="40">';
|
||||||
$paymentstatic->rowid=$objp->rowid;
|
$paymentstatic->id=$objp->rowid;
|
||||||
|
$paymentstatic->ref=$objp->rowid;
|
||||||
print $paymentstatic->getNomUrl(1);
|
print $paymentstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -18,11 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/tva/fiche.php
|
* \file htdocs/compta/tva/fiche.php
|
||||||
\ingroup tax
|
* \ingroup tax
|
||||||
\brief Page des règlements de TVA
|
* \brief Page des règlements de TVA
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/tva/tva.class.php");
|
||||||
@ -50,10 +50,13 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
|||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
|
$datev=dolibarr_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]);
|
||||||
|
$datep=dolibarr_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]);
|
||||||
|
|
||||||
$tva->accountid=$_POST["accountid"];
|
$tva->accountid=$_POST["accountid"];
|
||||||
$tva->paymenttype=$_POST["paiementtype"];
|
$tva->paymenttype=$_POST["paiementtype"];
|
||||||
$tva->datev=dolibarr_mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]);
|
$tva->datev=$datev;
|
||||||
$tva->datep=dolibarr_mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]);
|
$tva->datep=$datep;
|
||||||
$tva->amount=$_POST["amount"];
|
$tva->amount=$_POST["amount"];
|
||||||
$tva->label=$_POST["label"];
|
$tva->label=$_POST["label"];
|
||||||
|
|
||||||
@ -150,27 +153,27 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td>'.$langs->trans("DatePayment").'</td><td>';
|
print '<td>'.$langs->trans("DatePayment").'</td><td>';
|
||||||
print $html->select_date("","datev",'','','','add');
|
print $html->select_date($datep,"datep",'','','','add');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("DateValue").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateValue").'</td><td>';
|
||||||
print $html->select_date("","datep",'','','','add');
|
print $html->select_date($datev,"datev",'','','','add');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="label" size="40" value="'.$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
|
// Amount
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value=""></td></tr>';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>';
|
||||||
|
|
||||||
if ($conf->banque->enabled)
|
if ($conf->banque->enabled)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Account").'</td><td>';
|
print '<tr><td>'.$langs->trans("Account").'</td><td>';
|
||||||
$html->select_comptes($vatpayment->fk_account,"accountid",0,"courant=1",1); // Affiche liste des comptes courant
|
$html->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
|
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
|
||||||
$html->select_types_paiements($vatpayment->fk_type, "paiementtype");
|
$html->select_types_paiements($_POST["paiementtype"], "paiementtype");
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,29 +219,24 @@ if ($id)
|
|||||||
print dolibarr_print_date($vatpayment->datev,'day');
|
print dolibarr_print_date($vatpayment->datev,'day');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if ($conf->banque->enabled)
|
|
||||||
{
|
|
||||||
print '<tr><td>'.$langs->trans("Account").'</td>';
|
|
||||||
if ($vatpayment->fk_account > 0)
|
|
||||||
{
|
|
||||||
$account=new Account($db);
|
|
||||||
$result=$account->fetch($vatpayment->fk_account);
|
|
||||||
print '<td>'.$account->getNomUrl(1).'</td>';
|
|
||||||
print '<td width="25%">'.$langs->trans("BankLineConciliated").'</td><td width="25%">'.yn($vatpayment->rappro).'</td>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td colspan="3"> </td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td colspan="3">';
|
|
||||||
print $vatpayment->fk_type ? $langs->trans("PaymentTypeShort".$vatpayment->fk_type) : ' ';
|
|
||||||
print "</td>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</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)
|
||||||
|
{
|
||||||
|
$bankline=new AccountLine($db);
|
||||||
|
$bankline->fetch($vatpayment->fk_bank);
|
||||||
|
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||||
|
print '<td colspan="3">';
|
||||||
|
print $bankline->getNomUrl(1,0,'showall');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -42,6 +42,7 @@ class Tva extends CommonObject
|
|||||||
//var $table_element='tva'; //!< Name of table without prefix where object is stored
|
//var $table_element='tva'; //!< Name of table without prefix where object is stored
|
||||||
|
|
||||||
var $id;
|
var $id;
|
||||||
|
var $ref;
|
||||||
|
|
||||||
var $tms;
|
var $tms;
|
||||||
var $datep;
|
var $datep;
|
||||||
@ -461,7 +462,7 @@ class Tva extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* \brief Ajoute un paiement de TVA
|
* \brief Ajoute un paiement de TVA
|
||||||
* \param user Object user that insert
|
* \param user Object user that insert
|
||||||
* \return int <0 if KO, rowid in tva table if OK
|
* \return int <0 if KO, rowid in tva table if OK
|
||||||
@ -538,16 +539,13 @@ class Tva extends CommonObject
|
|||||||
$ok=0;
|
$ok=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mise a jour liens (pour chaque charge concernée par le paiement)
|
// Mise a jour liens
|
||||||
//foreach ($paiement->amounts as $key => $value)
|
$result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/tva/fiche.php?id=', "(VATPayment)", "payment_vat");
|
||||||
//{
|
if ($result < 0)
|
||||||
// $chid = $key;
|
{
|
||||||
// $fac = new Facture($db);
|
$this->error=$acc->error;
|
||||||
// $fac->fetch($chid);
|
$ok=0;
|
||||||
// $fac->fetch_client();
|
}
|
||||||
// $acc->add_url_line($bank_line_id, $paiement_id, DOL_URL_ROOT.'/compta/paiement/fiche.php?id=', "(paiement)");
|
|
||||||
// $acc->add_url_line($bank_line_id, $fac->client->id, DOL_URL_ROOT.'/compta/fiche.php?socid=', $fac->client->nom);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ok)
|
if ($ok)
|
||||||
|
|||||||
@ -479,12 +479,12 @@ class PaiementFourn
|
|||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$this->rowid.'">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$this->id.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"),'payment').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"),'payment').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$lien.$this->rowid.$lienfin;
|
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -47,6 +47,10 @@ AccountancyTreasuryArea=Accountancy/Treasury area
|
|||||||
AccountancySetup=Accountancy setup
|
AccountancySetup=Accountancy setup
|
||||||
NewPayment=New payment
|
NewPayment=New payment
|
||||||
Payments=Payments
|
Payments=Payments
|
||||||
|
PaymentCustomerInvoice=Customer invoice payment
|
||||||
|
PaymentSupplierInvoice=Supplier invoice payment
|
||||||
|
PaymentSocialContribution=Social contribution payment
|
||||||
|
PaymentVat=VAT payment
|
||||||
ListPayment=List of payments
|
ListPayment=List of payments
|
||||||
ListOfPayments=List of payments
|
ListOfPayments=List of payments
|
||||||
ListOfCustomerPayments=List of customer payments
|
ListOfCustomerPayments=List of customer payments
|
||||||
@ -55,6 +59,7 @@ DatePayment=Payment date
|
|||||||
NewVATPayment=New VAT payment
|
NewVATPayment=New VAT payment
|
||||||
VATPayment=VAT Payment
|
VATPayment=VAT Payment
|
||||||
VATPayments=VAT Payments
|
VATPayments=VAT Payments
|
||||||
|
ShowVatPayment=Show VAT payement
|
||||||
TotalToPay=Total to pay
|
TotalToPay=Total to pay
|
||||||
TotalVATReceived=Total VAT received
|
TotalVATReceived=Total VAT received
|
||||||
CustomerAccountancyCode=Customer accountancy code
|
CustomerAccountancyCode=Customer accountancy code
|
||||||
|
|||||||
@ -47,6 +47,10 @@ AccountancyTreasuryArea=Espace Compta/Tr
|
|||||||
AccountancySetup=Configuration compta
|
AccountancySetup=Configuration compta
|
||||||
NewPayment=Nouveau réglement
|
NewPayment=Nouveau réglement
|
||||||
Payments=Réglements
|
Payments=Réglements
|
||||||
|
PaymentCustomerInvoice=Réglement facture client
|
||||||
|
PaymentSupplierInvoice=Réglement facture fournisseur
|
||||||
|
PaymentSocialContribution=Réglement charge sociale
|
||||||
|
PaymentVat=Réglement TVA
|
||||||
ListPayment=Liste des réglements
|
ListPayment=Liste des réglements
|
||||||
ListOfPayments=Liste des réglements
|
ListOfPayments=Liste des réglements
|
||||||
ListOfCustomerPayments=Liste des réglements clients
|
ListOfCustomerPayments=Liste des réglements clients
|
||||||
@ -55,6 +59,7 @@ DatePayment=Date de r
|
|||||||
NewVATPayment=Nouveau réglement de TVA
|
NewVATPayment=Nouveau réglement de TVA
|
||||||
VATPayment=Réglement TVA
|
VATPayment=Réglement TVA
|
||||||
VATPayments=Réglements TVA
|
VATPayments=Réglements TVA
|
||||||
|
ShowVatPayment=Affiche payment TVA
|
||||||
TotalToPay=Total à payer
|
TotalToPay=Total à payer
|
||||||
TotalVATReceived=Total TVA perçue
|
TotalVATReceived=Total TVA perçue
|
||||||
CustomerAccountancyCode=Code compta client
|
CustomerAccountancyCode=Code compta client
|
||||||
|
|||||||
@ -422,12 +422,12 @@ class Paiement
|
|||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$this->rowid.'">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$this->id.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"),'payment').$lienfin);
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"),'payment').$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$lien.$this->rowid.$lienfin;
|
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user