Withdrawals: Visual enhancements
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -26,6 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
||||||
|
|
||||||
$langs->load("widthdrawals");
|
$langs->load("widthdrawals");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
@ -42,6 +44,7 @@ $sortfield = $_GET["sortfield"];
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("WithdrawalsReceipts"));
|
llxHeader('',$langs->trans("WithdrawalsReceipts"));
|
||||||
|
|
||||||
|
$bon=new BonPrelevement($db,"");
|
||||||
|
|
||||||
if ($page == -1) { $page = 0 ; }
|
if ($page == -1) { $page = 0 ; }
|
||||||
$offset = $conf->liste_limit * $page ;
|
$offset = $conf->liste_limit * $page ;
|
||||||
@ -51,6 +54,7 @@ if (! $sortorder) $sortorder="DESC";
|
|||||||
if (! $sortfield) $sortfield="p.datec";
|
if (! $sortfield) $sortfield="p.datec";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mode Liste
|
* Mode Liste
|
||||||
*
|
*
|
||||||
@ -97,8 +101,10 @@ if ($result)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
print '<img border="0" src="./img/statut'.$obj->statut.'.png"></a> ';
|
|
||||||
|
print $bon->LibStatut($obj->statut,2);
|
||||||
|
print " ";
|
||||||
|
|
||||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||||
|
|
||||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n";
|
print '<td align="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n";
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -140,20 +140,20 @@ class LignePrelevement
|
|||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut7').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 2)
|
if ($mode == 2)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut7');
|
if ($statut==3) return img_picto($langs->trans($this->statuts[$statut]),'statut8');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 3)
|
if ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
if ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
if ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut7');
|
if ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut8');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -51,6 +51,40 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'dayhour').'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
||||||
|
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Status
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
|
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if($bon->date_trans <> 0)
|
||||||
|
{
|
||||||
|
$muser = new User($db);
|
||||||
|
$muser->fetch($bon->user_trans);
|
||||||
|
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
||||||
|
print dol_print_date($bon->date_trans,'dayhour');
|
||||||
|
print ' / '.$muser->getFullName($langs).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
|
||||||
|
print $bon->methodes_trans[$bon->method_trans];
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
if($bon->date_credit <> 0)
|
||||||
|
{
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
|
||||||
|
print dol_print_date($bon->date_credit,'dayhour');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -54,6 +54,40 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'dayhour').'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
||||||
|
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Status
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
|
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if($bon->date_trans <> 0)
|
||||||
|
{
|
||||||
|
$muser = new User($db);
|
||||||
|
$muser->fetch($bon->user_trans);
|
||||||
|
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
||||||
|
print dol_print_date($bon->date_trans,'dayhour');
|
||||||
|
print ' / '.$muser->getFullName($langs).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
|
||||||
|
print $bon->methodes_trans[$bon->method_trans];
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
if($bon->date_credit <> 0)
|
||||||
|
{
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
|
||||||
|
print dol_print_date($bon->date_credit,'dayhour');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -27,6 +27,7 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/prelevement.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/prelevement.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/ligne-prelevement.class.php");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
@ -55,6 +56,40 @@ if ($prev_id)
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'dayhour').'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
||||||
|
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Status
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
|
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if($bon->date_trans <> 0)
|
||||||
|
{
|
||||||
|
$muser = new User($db);
|
||||||
|
$muser->fetch($bon->user_trans);
|
||||||
|
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
||||||
|
print dol_print_date($bon->date_trans,'dayhour');
|
||||||
|
print ' / '.$muser->getFullName($langs).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
|
||||||
|
print $bon->methodes_trans[$bon->method_trans];
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
if($bon->date_credit <> 0)
|
||||||
|
{
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
|
||||||
|
print dol_print_date($bon->date_credit,'dayhour');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -69,6 +104,8 @@ if ($prev_id)
|
|||||||
* Stats
|
* Stats
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
$ligne=new LignePrelevement($db,$user);
|
||||||
|
|
||||||
$sql = "SELECT sum(pl.amount), pl.statut";
|
$sql = "SELECT sum(pl.amount), pl.statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||||
$sql.= " WHERE pl.fk_prelevement_bons = ".$prev_id;
|
$sql.= " WHERE pl.fk_prelevement_bons = ".$prev_id;
|
||||||
@ -92,20 +129,8 @@ if ($prev_id)
|
|||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
|
|
||||||
if ($row[1] == 2)
|
print $ligne->LibStatut($row[1],1);
|
||||||
{
|
|
||||||
print $langs->trans("StatusCredited");
|
|
||||||
}
|
|
||||||
elseif ($row[1] == 3)
|
|
||||||
{
|
|
||||||
print $langs->trans("StatusRefused");
|
|
||||||
}
|
|
||||||
elseif ($row[1] == 1)
|
|
||||||
{
|
|
||||||
print $langs->trans("StatusWaiting");
|
|
||||||
}
|
|
||||||
else print $langs->trans("StatusUnknown");
|
|
||||||
|
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print price($row[0]);
|
print price($row[0]);
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 197 B |
|
Before Width: | Height: | Size: 193 B |
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -28,6 +28,7 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/prelevement.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/prelevement.lib.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/ligne-prelevement.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/rejet-prelevement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/rejet-prelevement.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php");
|
||||||
|
|
||||||
@ -56,7 +57,42 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
//print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'dayhour').'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("File").'</td><td>';
|
||||||
|
|
||||||
|
$relativepath = 'receipts/'.$bon->ref;
|
||||||
|
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||||
|
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Status
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||||
|
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if($bon->date_trans <> 0)
|
||||||
|
{
|
||||||
|
$muser = new User($db);
|
||||||
|
$muser->fetch($bon->user_trans);
|
||||||
|
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
||||||
|
print dol_print_date($bon->date_trans,'dayhour');
|
||||||
|
print ' / '.$muser->getFullName($langs).'</td></tr>';
|
||||||
|
print '<tr><td width="20%">'.$langs->trans("TransMetod").'</td><td>';
|
||||||
|
print $bon->methodes_trans[$bon->method_trans];
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
if($bon->date_credit <> 0)
|
||||||
|
{
|
||||||
|
print '<tr><td width="20%">'.$langs->trans('CreditDate').'</td><td>';
|
||||||
|
print dol_print_date($bon->date_credit,'dayhour');
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -64,7 +100,7 @@ if ($_GET["id"])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Erreur";
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +108,8 @@ $page = $_GET["page"];
|
|||||||
$sortorder = $_GET["sortorder"];
|
$sortorder = $_GET["sortorder"];
|
||||||
$sortfield = $_GET["sortfield"];
|
$sortfield = $_GET["sortfield"];
|
||||||
|
|
||||||
|
$ligne=new LignePrelevement($db,$user);
|
||||||
|
|
||||||
if ($page == -1) { $page = 0 ; }
|
if ($page == -1) { $page = 0 ; }
|
||||||
|
|
||||||
$offset = $conf->liste_limit * $page ;
|
$offset = $conf->liste_limit * $page ;
|
||||||
@ -129,10 +167,7 @@ if ($result)
|
|||||||
|
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
|
|
||||||
if ($obj->statut==0) print img_picto($langs->trans("StatusWaiting"),'statut0');
|
print $ligne->LibStatut($obj->statut,2);
|
||||||
if ($obj->statut==2) print img_picto($langs->trans("StatusCredited"),'statut4');
|
|
||||||
if ($obj->statut==3) print img_picto($langs->trans("StatusRefused"),'statut7');
|
|
||||||
|
|
||||||
print " ";
|
print " ";
|
||||||
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">';
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -25,6 +26,8 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/bon-prelevement.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/ligne-prelevement.class.php");
|
||||||
|
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
@ -35,6 +38,9 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'prelevement','','','bons');
|
$result = restrictedArea($user, 'prelevement','','','bons');
|
||||||
|
|
||||||
|
$bon=new BonPrelevement($db,"");
|
||||||
|
$ligne=new LignePrelevement($db,$user);
|
||||||
|
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
$sortorder = (empty($_GET["sortorder"])) ? "DESC" : $_GET["sortorder"];
|
$sortorder = (empty($_GET["sortorder"])) ? "DESC" : $_GET["sortorder"];
|
||||||
$sortfield = (empty($_GET["sortfield"])) ? "p.datec" : $_GET["sortfield"];
|
$sortfield = (empty($_GET["sortfield"])) ? "p.datec" : $_GET["sortfield"];
|
||||||
@ -131,9 +137,7 @@ if ($result)
|
|||||||
|
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
|
|
||||||
if ($obj->statut_ligne==0) print img_picto($langs->trans("StatusWaiting"),'statut0');
|
print $ligne->LibStatut($obj->statut_ligne,2);
|
||||||
if ($obj->statut_ligne==2) print img_picto($langs->trans("StatusCredited"),'statut4');
|
|
||||||
if ($obj->statut_ligne==3) print img_picto($langs->trans("StatusRefused"),'statut7');
|
|
||||||
print " ";
|
print " ";
|
||||||
|
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid_ligne.'">';
|
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid_ligne.'">';
|
||||||
@ -142,9 +146,7 @@ if ($result)
|
|||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
if ($obj->statut==0) print img_picto($langs->trans("StatusWaiting"),'statut0');
|
print $bon->LibStatut($obj->statut,2);
|
||||||
if ($obj->statut==1) print img_picto($langs->trans("StatusTrans"),'statut1');
|
|
||||||
if ($obj->statut==2) print img_picto($langs->trans("StatusCredited"),'statut4');
|
|
||||||
print " ";
|
print " ";
|
||||||
|
|
||||||
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
print '<a href="fiche.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/prelevement/class/ligne-prelevement.class.php");
|
||||||
|
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
@ -69,6 +70,8 @@ if ($resql)
|
|||||||
/*
|
/*
|
||||||
* Stats
|
* Stats
|
||||||
*/
|
*/
|
||||||
|
$ligne=new LignePrelevement($db,$user);
|
||||||
|
|
||||||
$sql = "SELECT sum(pl.amount), count(pl.amount), pl.statut";
|
$sql = "SELECT sum(pl.amount), count(pl.amount), pl.statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||||
@ -90,18 +93,14 @@ if ($resql)
|
|||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
|
|
||||||
$st[0] = $langs->trans("StatusWaiting");
|
|
||||||
$st[1] = $langs->trans("StatusWaiting");
|
|
||||||
$st[2] = $langs->trans("StatusCredited");
|
|
||||||
$st[3] = $langs->trans("StatusRefused");
|
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row($resql);
|
$row = $db->fetch_row($resql);
|
||||||
|
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
|
|
||||||
print $st[$row[2]];
|
print $ligne->LibStatut($row[2],1);
|
||||||
|
//print $st[$row[2]];
|
||||||
print '</td><td align="center">';
|
print '</td><td align="center">';
|
||||||
print $row[1];
|
print $row[1];
|
||||||
|
|
||||||
|
|||||||
0
htdocs/compta/prelevement/img/statut3.png → htdocs/theme/auguria/img/statut8.png
Normal file → Executable file
|
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 193 B |
BIN
htdocs/theme/bureau2crea/img/statut8.png
Executable file
|
After Width: | Height: | Size: 193 B |
BIN
htdocs/theme/eldy/img/statut8.png
Executable file
|
After Width: | Height: | Size: 193 B |
BIN
htdocs/theme/freelug/img/statut8.png
Executable file
|
After Width: | Height: | Size: 193 B |
BIN
htdocs/theme/yellow/img/statut8.png
Executable file
|
After Width: | Height: | Size: 193 B |