Qual: Uniformize withdrawals code
This commit is contained in:
parent
a59deddb0f
commit
eb55db74c0
@ -1,6 +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>
|
||||||
*
|
*
|
||||||
* 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,12 +26,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.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";
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Securite acces client
|
* Securite acces client
|
||||||
*/
|
*/
|
||||||
@ -39,37 +40,6 @@ if (!$user->rights->prelevement->bons->lire) accessforbidden();
|
|||||||
|
|
||||||
llxHeader('','Bon de prelevement');
|
llxHeader('','Bon de prelevement');
|
||||||
|
|
||||||
$h = 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if ($conf->use_preview_tabs)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Lines");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Bills");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Rejets");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Statistics");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$prev_id = $_GET["id"];
|
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
@ -78,7 +48,8 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
if ($bon->fetch($_GET["id"]) == 0)
|
if ($bon->fetch($_GET["id"]) == 0)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $hselected, 'Prelevement : '. $bon->ref);
|
$head = prelevement_prepare_head($bon);
|
||||||
|
dol_fiche_head($head, 'preview', 'Prelevement : '. $bon->ref);
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@ -112,7 +83,6 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print "handle failed!<BR>\nReason: $reason<BR>\nDescription: $description<BR>\n";
|
print "handle failed!<BR>\nReason: $reason<BR>\nDescription: $description<BR>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
imagick_convert( $handle, "PNG" ) ;
|
imagick_convert( $handle, "PNG" ) ;
|
||||||
|
|
||||||
if ( imagick_iserror( $handle ) )
|
if ( imagick_iserror( $handle ) )
|
||||||
@ -122,7 +92,6 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
print "handle failed!<BR>\nReason: $reason<BR>\nDescription: $description<BR>\n";
|
print "handle failed!<BR>\nReason: $reason<BR>\nDescription: $description<BR>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
imagick_writeimage( $handle, $fileps .".png");
|
imagick_writeimage( $handle, $fileps .".png");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -2,6 +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>
|
||||||
*
|
*
|
||||||
* 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."/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/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");
|
||||||
@ -38,45 +40,14 @@ if ($user->societe_id > 0) accessforbidden();
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||||
|
|
||||||
$h = 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if ($conf->use_preview_tabs)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Lines");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Bills");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Rejects");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Statistics");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
{
|
{
|
||||||
$prev_id = $_GET["id"];
|
|
||||||
|
|
||||||
$bon = new BonPrelevement($db,"");
|
$bon = new BonPrelevement($db,"");
|
||||||
|
|
||||||
if ($bon->fetch($_GET["id"]) == 0)
|
if ($bon->fetch($_GET["id"]) == 0)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
$head = prelevement_prepare_head($bon);
|
||||||
|
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
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>';
|
||||||
@ -86,7 +57,7 @@ if ($_GET["id"])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Erreur";
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +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>
|
||||||
*
|
*
|
||||||
* 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,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.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/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");
|
||||||
@ -39,35 +41,6 @@ if ($user->societe_id > 0) accessforbidden();
|
|||||||
*/
|
*/
|
||||||
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||||
|
|
||||||
$h = 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if ($conf->use_preview_tabs)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Lines");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Bills");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Rejects");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Statistics");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$prev_id = $_GET["id"];
|
$prev_id = $_GET["id"];
|
||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
@ -76,7 +49,8 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
if ($bon->fetch($_GET["id"]) == 0)
|
if ($bon->fetch($_GET["id"]) == 0)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
$head = prelevement_prepare_head($bon);
|
||||||
|
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
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>';
|
||||||
@ -92,6 +66,7 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
$rej = new RejetPrelevement($db, $user);
|
$rej = new RejetPrelevement($db, $user);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Liste des factures
|
* Liste des factures
|
||||||
*
|
*
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.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");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -40,35 +41,6 @@ $langs->load("categories");
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||||
|
|
||||||
$h = 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if ($conf->use_preview_tabs)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Lines");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Bills");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Rejects");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Statistics");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$prev_id = $_GET["id"];
|
$prev_id = $_GET["id"];
|
||||||
|
|
||||||
if ($prev_id)
|
if ($prev_id)
|
||||||
@ -77,7 +49,8 @@ if ($prev_id)
|
|||||||
|
|
||||||
if ($bon->fetch($_GET["id"]) == 0)
|
if ($bon->fetch($_GET["id"]) == 0)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
$head = prelevement_prepare_head($bon);
|
||||||
|
dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.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");
|
||||||
|
|
||||||
if (!$user->rights->prelevement->bons->lire)
|
if (!$user->rights->prelevement->bons->lire)
|
||||||
@ -108,37 +109,6 @@ if (GETPOST("action") == 'infocredit')
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||||
|
|
||||||
$h = 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if ($conf->use_preview_tabs)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Lines");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Bills");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Rejects");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Statistics");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$prev_id = $_GET["id"];
|
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
@ -147,7 +117,8 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
if ($bon->fetch($_GET["id"]) == 0)
|
if ($bon->fetch($_GET["id"]) == 0)
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
$head = prelevement_prepare_head($bon);
|
||||||
|
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
if (isset($_GET["error"]))
|
if (isset($_GET["error"]))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,6 +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>
|
||||||
*
|
*
|
||||||
* 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,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.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/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");
|
||||||
@ -41,35 +43,6 @@ $langs->load("categories");
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||||
|
|
||||||
$h = 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if ($conf->use_preview_tabs)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Preview");
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Lines");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Bills");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Rejects");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Statistics");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$prev_id = $_GET["id"];
|
$prev_id = $_GET["id"];
|
||||||
|
|
||||||
if ($_GET["id"])
|
if ($_GET["id"])
|
||||||
@ -78,9 +51,8 @@ if ($_GET["id"])
|
|||||||
|
|
||||||
if ($bon->fetch($_GET["id"]) == 0)
|
if ($bon->fetch($_GET["id"]) == 0)
|
||||||
{
|
{
|
||||||
|
$head = prelevement_prepare_head($bon);
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("WithdrawalReceipt"), '', 'payment');
|
dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +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>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -41,26 +42,6 @@ $result = restrictedArea($user, 'prelevement','','','bons');
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("WithdrawsRefused"));
|
llxHeader('',$langs->trans("WithdrawsRefused"));
|
||||||
|
|
||||||
$h = 0;
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Card");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Bills");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/rejets.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Rejects");
|
|
||||||
$hselected = $h;
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$_GET["id"];
|
|
||||||
$head[$h][1] = $langs->trans("Statistics");
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
$prev_id = $_GET["id"];
|
|
||||||
|
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
$sortorder = $_GET["sortorder"];
|
$sortorder = $_GET["sortorder"];
|
||||||
$sortfield = $_GET["sortfield"];
|
$sortfield = $_GET["sortfield"];
|
||||||
|
|||||||
95
htdocs/lib/prelevement.lib.php
Normal file
95
htdocs/lib/prelevement.lib.php
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
* or see http://www.gnu.org/
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/lib/prelevement.lib.php
|
||||||
|
* \brief Ensemble de fonctions de base pour le module prelevement
|
||||||
|
* \ingroup propal
|
||||||
|
* \version $Id$
|
||||||
|
*
|
||||||
|
* Ensemble de fonctions de base de dolibarr sous forme d'include
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare head for prelevement screen and return it
|
||||||
|
* @param prelevement class BonPrelevement
|
||||||
|
* @return array head
|
||||||
|
*/
|
||||||
|
function prelevement_prepare_head($prelevement)
|
||||||
|
{
|
||||||
|
global $langs, $conf, $user;
|
||||||
|
$langs->load("withdrawals");
|
||||||
|
|
||||||
|
$h = 0;
|
||||||
|
$head = array();
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche.php?id='.$prelevement->id;
|
||||||
|
$head[$h][1] = $langs->trans("Card");
|
||||||
|
$head[$h][2] = 'prelevement';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
if ($conf->use_preview_tabs)
|
||||||
|
{
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/bon.php?id='.$prelevement->id;
|
||||||
|
$head[$h][1] = $langs->trans("Preview");
|
||||||
|
$head[$h][2] = 'preview';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/lignes.php?id='.$prelevement->id;
|
||||||
|
$head[$h][1] = $langs->trans("Lines");
|
||||||
|
$head[$h][2] = 'lines';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/factures.php?id='.$prelevement->id;
|
||||||
|
$head[$h][1] = $langs->trans("Bills");
|
||||||
|
$head[$h][2] = 'invoices';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-rejet.php?id='.$prelevement->id;
|
||||||
|
$head[$h][1] = $langs->trans("Rejects");
|
||||||
|
$head[$h][2] = 'rejects';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/prelevement/fiche-stat.php?id='.$prelevement->id;
|
||||||
|
$head[$h][1] = $langs->trans("Statistics");
|
||||||
|
$head[$h][2] = 'statistics';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
||||||
|
if (is_array($conf->tabs_modules['prelevement']))
|
||||||
|
{
|
||||||
|
$i=0;
|
||||||
|
foreach ($conf->tabs_modules['prelevement'] as $value)
|
||||||
|
{
|
||||||
|
$values=explode(':',$value);
|
||||||
|
if ($values[2]) $langs->load($values[2]);
|
||||||
|
$head[$h][0] = DOL_URL_ROOT . preg_replace('/__ID__/i',$propal->id,$values[3]);
|
||||||
|
$head[$h][1] = $langs->trans($values[1]);
|
||||||
|
$head[$h][2] = 'tab'.$values[1];
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $head;
|
||||||
|
}
|
||||||
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user