value[] = array('value' => 'S', 'label' => _("Fournisseurs")); $tiers->value[] = array('value' => 'C', 'label' => _("Clients")); $time_limit = new \ISelect('time_limit'); $time_limit->value[] = array('value' => 'P', 'label' => _("Prochaines factures")); $time_limit->value[] = array('value' => 'R', 'label' => _("Factures en retard")); $time_limit->value[] = array('value' => 'T', 'label' => _("Factures pour aujourd'hui")); $input = _("Factures ") . $tiers->input() . " " . _("échéance") . " " . $time_limit->input(); $this->make_form($input); } function display_parameter() { $aParam = $this->get_parameter(); $aTiers = ['S' => _("Fournisseurs"), "C" => _("Clients")]; $aLimit = ['P' => _("Prochaines"), "R" => "Retard",'T'=>_("Aujourd'hui")]; echo ''.$aTiers[$aParam['tiers']] . " " . $aLimit[$aParam["time_limit"]].''; } function display() { $this->open_div(); $aParam = $this->get_parameter(); $aTiers = ['S' => _("Fournisseurs"), "C" => _("Clients")]; $aLimit = ['P' => _("Prochaines factures"), "R" => "facture en retard",'T'=>_("Aujourd'hui")]; $title = $aTiers[$aParam['tiers']] . " " . $aLimit[$aParam["time_limit"]]; echo h2($title, 'class="title"'); $acc_ledger = new \Acc_Ledger($this->db, 0); $ledger_type = 'ACH'; if ($aParam['tiers'] == 'C') { $ledger_type = 'VEN'; } switch ($aParam['time_limit']) { case 'P': $array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '>'); break; case 'R': $array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '<'); break; case 'T': $array = $acc_ledger->get_operation_date(date('d.m.Y'), $ledger_type, '='); break; } include "invoice-display.php"; $this->close_div(); } }