noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
Noalyss\Widget\Invoice Class Reference

display the next invoice to be paid or late for customer or supplier More...

+ Inheritance diagram for Noalyss\Widget\Invoice:
+ Collaboration diagram for Noalyss\Widget\Invoice:

Public Member Functions

 display ()
 display the widget
 
 display_parameter ()
 display the parameter
 
 input_parameter ()
 let choice what to display
 
- Public Member Functions inherited from Noalyss\Widget\Widget
 __construct (protected int $user_widget_id=0, protected string $widget_code="", protected $db=null)
 
 button_zoom ()
 compute the button ZOOM to put in the title
 
 close_div ()
 
 get_div_domid ()
 compute the DIV ID
 
 get_parameter ()
 get the parameter of the widget and returns an array
 
 get_user_widget_id ()
 
 get_widget_code ()
 
 input ($flnumber=true)
 display a description of the widget and allow to save it for the current user, call input_param function of the widget if it exists
 
 make_form ($html_input)
 open a form with the DOMID "widget_code"_param, it appears once only for each widget in the dialog box for adding widget to the dashboard
 
 open_div ()
 output the DIV HTML with class and id for the widget
 
 set_user_widget_id (int $user_widget_id)
 
 set_widget_code (string $widget_code)
 
 title ( $title)
 display the title and the icon for zooming
 

Static Public Member Functions

static getConstantLimit ()
 return the constant array Limit
 
static getConstantTiers ()
 return the constant array Tiers
 
- Static Public Member Functions inherited from Noalyss\Widget\Widget
static ajax_display (Widget $widget)
 display a box and fills it with the content of an ajax calls , the ajax calls Widget::display
 
static build_user_widget ($user_widget_id, $widget_code)
 Build a widget thank the user_widget_id (SQL :PK : USER_WIDGET.UW_ID) and $widget_code.
 
static display_available ()
 @brier display activated widgets
 
static get_enabled_widget ()
 returns an array of widget for the connected user, ordered
 
static save ($array)
 save widget order from an array
 
static scanfolder ()
 scan folder to find install.php file , include them if the code is not in DB
 
static select_available ()
 show all the widget that can be added
 

Detailed Description

display the next invoice to be paid or late for customer or supplier

Definition at line 29 of file invoice.php.

Member Function Documentation

◆ display()

Noalyss\Widget\Invoice::display ( )

display the widget

Returns
void
Exceptions

Exception

Reimplemented from Noalyss\Widget\Widget.

Definition at line 88 of file invoice.php.

89 {
90 $this->open_div();
91 $aParam = $this->get_parameter();
92 $aTiers = Invoice::getConstantTiers();
93 $aLimit = Invoice::getConstantLimit();
94 $title = $aTiers[$aParam['tiers']] . " " . $aLimit[$aParam["time_limit"]];
95
96 $this->title($title);
97
98 $acc_ledger = new \Acc_Ledger($this->db, 0);
99
100 $ledger_type = 'ACH';
101 if ($aParam['tiers'] == 'C') {
102 $ledger_type = 'VEN';
103 }
104
105 switch ($aParam['time_limit']) {
106 case 'P':
107 $array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '>');
108 break;
109 case 'R':
110 $array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '<');
111 break;
112 case 'T':
113 $array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '=');
114 break;
115 }
116 include "invoice-display.php";
117 $this->close_div();
118
119
120 }
$anc_filter title
$SecUser db

References $array, $ledger_type, $title, Noalyss\Widget\Widget\close_div(), db, Noalyss\Widget\Widget\get_parameter(), getConstantLimit(), getConstantTiers(), Noalyss\Widget\Widget\open_div(), and title.

+ Here is the call graph for this function:

◆ display_parameter()

Noalyss\Widget\Invoice::display_parameter ( )

display the parameter

Returns
void

Reimplemented from Noalyss\Widget\Widget.

Definition at line 75 of file invoice.php.

76 {
77 $aParam = $this->get_parameter();
78 $aTiers =Invoice::getConstantTiers();
79 $aLimit = Invoice::getConstantLimit();
80 echo '<span class="widget_param">'.$aTiers[$aParam['tiers']] . " " . $aLimit[$aParam["time_limit"]].'</span>';
81 }

References Noalyss\Widget\Widget\get_parameter(), getConstantLimit(), and getConstantTiers().

+ Here is the call graph for this function:

◆ getConstantLimit()

static Noalyss\Widget\Invoice::getConstantLimit ( )
static

return the constant array Limit

Returns
array

Definition at line 43 of file invoice.php.

43 :array {
44 return ['P' => _("Prochaines factures"), "R" => "facture en retard",'T'=>_("Aujourd'hui")];
45 }
_("actif, passif,charge,...")

References _, and return.

Referenced by display(), display_parameter(), and input_parameter().

◆ getConstantTiers()

static Noalyss\Widget\Invoice::getConstantTiers ( )
static

return the constant array Tiers

Returns
array

Definition at line 35 of file invoice.php.

35 : array
36 {
37 return ['S' => _("Fournisseurs"), "C" => _("Clients")];;
38 }

References _.

Referenced by display(), display_parameter(), and input_parameter().

◆ input_parameter()

Noalyss\Widget\Invoice::input_parameter ( )

let choice what to display

Returns
void

Reimplemented from Noalyss\Widget\Widget.

Definition at line 51 of file invoice.php.

52 {
53 $tiers = new \ISelect('tiers');
54 $aTiers=Invoice::getConstantTiers();
55 $tiers->value=[];
56 foreach ($aTiers as $key=>$value) {
57 $tiers->value[]=['value'=>$key,'label'=>$value];
58 }
59 $time_limit = new \ISelect('time_limit');
60 $aLimit=Invoice::getConstantLimit();
61 $time_limit->value=[];
62 foreach ($aLimit as $key=>$value) {
63 $time_limit->value[]=['value'=>$key,'label'=>$value];
64 }
65
66 $input = _("Factures ") . $tiers->input() . " " . _("échéance") . " " . $time_limit->input();
67 $this->make_form($input);
68
69 }

References $input, $tiers, $value, _, getConstantLimit(), getConstantTiers(), and Noalyss\Widget\Widget\make_form().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: