46 parent::__construct($p_cn, $orientation, $unit, $format);
47 $this->ledger=$p_ledger;
124 switch ($p_type_export) {
134 (
$jrn_type==
'ACH'&&
$cn->get_value(
'select count(qp_id) from quant_purchase')
136 (
$jrn_type==
'VEN'&&
$cn->get_value(
'select count(qs_id) from quant_sold')
140 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
141 $p_ledger,$p_from,$p_to,$p_filter_operation);
142 $pdf->set_error(_(
'Ce journal ne peut être imprimé en mode simple'));
145 if (
$own->MY_TVA_USE==
'Y')
150 if (
$own->MY_TVA_USE==
'N')
152 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
153 $p_ledger,$p_from,$p_to,$p_filter_operation);
178 (
$jrn_type==
'ACH'&&
$cn->get_value(
'select count(qp_id) from quant_purchase')
180 (
$jrn_type==
'VEN'&&
$cn->get_value(
'select count(qs_id) from quant_sold')
184 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
185 $p_ledger,$p_from,$p_to,$p_filter_operation);
186 $pdf->set_error(_(
'Ce journal ne peut être imprimé en mode simple'));
189 if (
$own->MY_TVA_USE==
'Y')
194 if (
$own->MY_TVA_USE==
'N')
196 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
197 $p_ledger,$p_from,$p_to,$p_filter_operation);
227 (
$jrn_type==
'ACH'&&
$cn->get_value(
'select count(qp_id) from quant_purchase')
229 (
$jrn_type==
'VEN'&&
$cn->get_value(
'select count(qs_id) from quant_sold')
233 $pdf=
new Print_Ledger_Simple_without_vat(
$cn, $p_ledger,$p_from,$p_to,$p_filter_operation);
234 $pdf->set_error(
'Ce journal ne peut être imprimé en mode simple');
268 $sql=
"select jrn_def_id
269 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
270 join user_sec_jrn on uj_jrn_id=jrn_def_id
273 and uj_priv in ('R','W')
276 exists (select 1 from jrn
279 and jr_tech_per in (select p_id from parm_periode where p_exercice=$2)))
280 order by jrn_def_name
286 $a_jrn=
$cn->get_array(
"select jrn_def_id
287 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
290 or exists(select 1 from jrn
293 and jr_tech_per in (select p_id from parm_periode where p_exercice=$1))
294 order by jrn_def_name
301 $a[]=$a_jrn[
$i][
'jrn_def_id'];
317 $sql_filter=
" and (jr_date_paid is not null or jr_rapt ='paid' ) ";
320 $sql_filter=
" and (jr_date_paid is null and coalesce(jr_rapt,'x') <> 'paid' ) ";
323 throw new Exception(_(
"Filtre invalide", 5));
global $g_user
if no group available , then stop
catch(Exception $e) $exercice
get_type()
Return the type of a ledger (ACH,VEN,ODS or FIN) or GL.
contains the class for connecting to Noalyss
Class to manage the company parameter (address, name...)
API for creating PDF, unicode, based on tfpdf.
For the periode tables parm_periode and jrn_periode.
Print detail of operation PURCHASE or SOLD plus the items There is no report of the different amounts...
this class extends PDF and let you export the detailled printing of any ledgers
print a listing of financial
print a listing of Miscelleaneous operation
this class extends PDF and let you export the detailled printing of any ledgers
Parent class for the print_ledger class.
$to
integer parm_periode.p_id , start periode;
static factory(Database $cn, $p_type_export, Acc_Ledger $p_ledger, $p_from, $p_to, $p_filter_operation)
Create an object Print_Ledger* depending on $p_type_export ( 0 => accounting 1-> one row per operatio...
build_filter_operation()
Build a SQL clause to filter operation depending if they are paid, unpaid or no filter.
set_filter_operation($filter_operation)
Filter the operations ,.
__construct(\Database $p_cn, $orientation, $unit, $format, Acc_Ledger $p_ledger, $p_from, $p_to, $p_filter_operation)
integer parm_periode.p_id , end periode;
static available_ledger($get_from_periode)
find all the active ledger for the exerice of the periode and readable by the current user @global ty...
if( $delta< 0) elseif( $delta==0)