31#[AllowDynamicProperties]
76 parent::__construct($p_cn, $orientation, $unit, $format);
77 $this->ledger=$p_ledger;
154 switch ($p_type_export) {
164 (
$jrn_type==
'ACH'&&
$cn->get_value(
'select count(qp_id) from quant_purchase')
166 (
$jrn_type==
'VEN'&&
$cn->get_value(
'select count(qs_id) from quant_sold')
170 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
171 $p_ledger,$p_from,$p_to,$p_filter_operation);
172 $pdf->set_error(
_(
'Ce journal ne peut être imprimé en mode simple'));
175 if (
$own->MY_TVA_USE==
'Y')
180 if (
$own->MY_TVA_USE==
'N')
182 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
183 $p_ledger,$p_from,$p_to,$p_filter_operation);
208 (
$jrn_type==
'ACH'&&
$cn->get_value(
'select count(qp_id) from quant_purchase')
210 (
$jrn_type==
'VEN'&&
$cn->get_value(
'select count(qs_id) from quant_sold')
214 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
215 $p_ledger,$p_from,$p_to,$p_filter_operation);
216 $pdf->set_error(
_(
'Ce journal ne peut être imprimé en mode simple'));
219 if (
$own->MY_TVA_USE==
'Y')
224 if (
$own->MY_TVA_USE==
'N')
226 $pdf=
new Print_Ledger_Simple_without_vat(
$cn,
227 $p_ledger,$p_from,$p_to,$p_filter_operation);
257 (
$jrn_type==
'ACH'&&
$cn->get_value(
'select count(qp_id) from quant_purchase')
259 (
$jrn_type==
'VEN'&&
$cn->get_value(
'select count(qs_id) from quant_sold')
263 $pdf=
new Print_Ledger_Simple_without_vat(
$cn, $p_ledger,$p_from,$p_to,$p_filter_operation);
264 $pdf->set_error(
'Ce journal ne peut être imprimé en mode simple');
290 $cn=Dossier::connect();
298 $sql=
"select jrn_def_id
299 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
300 join user_sec_jrn on uj_jrn_id=jrn_def_id
303 and uj_priv in ('R','W')
306 exists (select 1 from jrn
309 and jr_tech_per in (select p_id from parm_periode where p_exercice=$2)))
310 order by jrn_def_name
316 $a_jrn=
$cn->get_array(
"select jrn_def_id
317 from jrn_def join jrn_type on jrn_def_type=jrn_type_id
320 or exists(select 1 from jrn
323 and jr_tech_per in (select p_id from parm_periode where p_exercice=$1))
324 order by jrn_def_name
331 $a[]=$a_jrn[
$i][
'jrn_def_id'];
347 $sql_filter=
" and (jr_date_paid is not null or jr_rapt ='paid' ) ";
350 $sql_filter=
" and (jr_date_paid is null and coalesce(jr_rapt,'x') <> 'paid' ) ";
353 throw new Exception(
_(
"Filtre invalide", 5));
global $g_user
if no group available , then stop
catch(Exception $e) $exercice
_("actif, passif,charge,...")
Class for jrn, class acc_ledger for manipulating the ledger AND some acc.
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.
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.
$rap_other_tax
$rap_other_tav, amount to report for other tax than VAT
$previous
internal variables for computing sum on PDF Listing
$tp_tva_np
$tp_tva_np (float) total page not deductible
$flag_other_tax
$flag_other_tax(bool) true if other tax exists
$rap_tva_np
$rap_tva_np VAT not deductible
$tp_nd
$tp_nd (float) total page price w/o VAT
$rap_priv
$rap_priv (float) personal expense
$rap_other
VAT when page starts.
$filter_operation
See Acc_Ledger_History::filter_operation.
$rap_tvac
$rap_tvac (float) previous amount
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 ,.
$rap_nd
$rap_nd (float) $no-deductible tax
$tp_priv
$tp_priv (float) total page personal expense
$tp_tva
$tp_tva (float) total page VAT
__construct(\Database $p_cn, $orientation, $unit, $format, Acc_Ledger $p_ledger, $p_from, $p_to, $p_filter_operation)
$tp_tvac
$tp_tvac (float) total page full price All Tax Incl.
$rap_htva
$previous (array) see Acc_Ledger->previous_amount
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...
$tp_htva
$tp_htva (float) total page price w/o VAT
$a_Tva
$other_tax_previous (array)
$rap_tva
$rap_tva array(tva_id,amount)
if( $delta< 0) elseif( $delta==0)