noalyss Version-9
balance_age.inc.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS isfree software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS isdistributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19// Copyright (2014) Author Dany De Bontridder <dany@alchimerys.be>
20
21if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
22global $http;
23/**
24 *@file
25 *@brief Print the aged balance for accountancy see
26 * @see Balance_Age
27 */
28$type=$http->get('p_type','string','C');
29$let=$http->get('p_let','string','unlet');
30
31$date_start=$http->get('p_date_start','string', '01.01.'.$g_user->get_exercice());
32$w_date_start=new IDate('p_date_start',$date_start);
33$w_select=new ISelect('p_type');
34$w_select->value=array(
35 array('value'=>'C','label'=>_('Client')),
36 array('value'=>'F','label'=>_('Fournisseur'))
37);
38$w_select->selected=$type;
39
40$w_lettre=new ISelect('p_let');
41$w_lettre->value=array(
42 array('value'=>'let','label'=>_('lettrées et non lettrées')),
43 array('value'=>'unlet','label'=>_('non lettrées'))
44);
45$w_lettre->selected=$let;
46
47?>
48<form method="GET" onsubmit="waiting_box()">
49 <?php
50 echo HtmlInput::request_to_hidden(array('gDossier','ac'));
51 ?>
52 <?php printf (_(' Opérations après la date %s qui sont %s '),$w_date_start->input(),$w_lettre->input())?>
53 <?php echo _("Type de tiers")." ".$w_select->input()?>
54 <?php echo HtmlInput::submit("view", _('Valider'))?>
55</form>
56
57<?php
58 if ( ! isset($_GET['view']) ):
60 return;
62?>
63<?php
64 $id=uniqid("export_");
65 $wb=sprintf( 'id="%s" onsubmit="download_document_form(\'%s\')" ',$id,$id);
66
67?>
68<form method="get" action="export.php" <?=$wb?> >
69 <?php
70 echo HtmlInput::request_to_hidden(array('gDossier','ac','p_type','p_let','p_date_start'));
71 echo HtmlInput::hidden('act','CSV:balance_age');
72 echo HtmlInput::submit('csv',_('export CSV'));
73?>
74</form>
75<?php
77
78 if ( $type == "C") :
79 $balance->display_sale($date_start,$let);
80 else:
81 $balance->display_purchase($date_start,$let);
82 endif;
83
84?>
html_page_stop()
end tag
Definition: ac_common.php:468
global $g_user
if no group available , then stop
$w_select
global $http
$w_date_start
$w_lettre
$balance
$date_start
$_GET['qcode']
compute the ageing balance, currently this code is not used
static request_to_hidden(array $array)
transform $_REQUEST data to hidden
static hidden($p_name, $p_value, $p_id="")
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Definition: idate.class.php:34
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...