wip : PDF : review interline
This commit is contained in:
parent
aa1d683221
commit
22010b2cd8
15 changed files with 50 additions and 60 deletions
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
class Anc_Acc_List extends Anc_Acc_Link
|
||||
{
|
||||
var $arow; //!< $arow array of row from
|
||||
/**
|
||||
*@brief display form to get the parameter
|
||||
* - card_poste 1 by card, 2 by account
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
/*!
|
||||
* \brief manage the table forecast
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Forecast
|
||||
{
|
||||
private static $variable=array ("id"=>"f_id",
|
||||
|
|
|
|||
|
|
@ -32,32 +32,34 @@
|
|||
class Print_Ledger extends PDF
|
||||
{
|
||||
protected $filter_operation; // See Acc_Ledger_History::filter_operation
|
||||
private $ledger ; //!< concerned Ledger
|
||||
private $from ; //<! integer parm_periode.p_id , start periode;
|
||||
private $to ; //<! integer parm_periode.p_id , end periode;
|
||||
protected $ledger ; //!< concerned Ledger
|
||||
protected $from ; //<! integer parm_periode.p_id , start periode;
|
||||
protected $to ; //<! integer parm_periode.p_id , end periode;
|
||||
|
||||
/**************************************************************************
|
||||
*internal variables for computing sum on PDF Listing
|
||||
*************************************************************************/
|
||||
protected $previous; //<! previous amount
|
||||
protected $rap_htva; //<! reminder amount w/o vat
|
||||
protected $rap_tva; //<! reminder amount VAT
|
||||
protected $rap_tvac; //<! reminder amount VAT included
|
||||
protected $rap_priv; //<! reminder amount private
|
||||
protected $rap_other_tax; //<! reminder amount for other tax
|
||||
protected $other_tax_previous; //<! reminder amount for other tax
|
||||
protected $a_Tva; //<! array of VAT
|
||||
protected $jrn_type; //<! type of ledger
|
||||
protected $rap_nd; //<! reminder not deductible
|
||||
protected $rap_tva_np; //<! reminder VAT not deductible
|
||||
protected $flag_other_tax; //<! flag for other taxe
|
||||
protected $tp_htva; //<! total page w/o VAT
|
||||
protected $tp_tvac; //<! total page VAT included
|
||||
protected $tp_priv; //<! total page private part
|
||||
protected $tp_nd ; //<! total page amount Not Deductible
|
||||
protected $tp_tva_np ; //<! total page VAT Not Deductible
|
||||
protected $tp_other_tax ; //<! total page other tax
|
||||
protected $tp_tva ; //<! total VAT
|
||||
protected $previous;//! $previous (array) see Acc_Ledger->previous_amount
|
||||
protected $rap_htva; //!< $rap_htva (float) previous price w/o VAT
|
||||
protected $rap_tvac; //!< $rap_tvac (float) previous amount
|
||||
//All Tax Include (full price)
|
||||
protected $rap_tva; //!< $rap_tva array(tva_id,amount)
|
||||
protected $rap_priv; //!< $rap_priv (float) personal expense
|
||||
protected $rap_other_tax; //!< $rap_other_tav, amount to report for other tax than VAT
|
||||
protected $other_tax_previous;//! $other_tax_previous (array)
|
||||
//see Acc_Ledger->previous_other_tax
|
||||
protected $a_Tva; //!< $a_Tva array ( tva_id,tva_label,tva_poste ) of existing_vat
|
||||
protected $jrn_type; //<! $jrn_type (string) 'VEN','ACH','ODS','FIN'
|
||||
protected $rap_nd; //!< $rap_nd (float) $no-deductible tax
|
||||
protected $rap_tva_np; //!< $rap_tva_np VAT not deductible
|
||||
|
||||
protected $flag_other_tax; //!< $flag_other_tax(bool) true if other tax exists
|
||||
protected $tp_htva; //!< $tp_htva (float) total page price w/o VAT
|
||||
protected $tp_tva; //!< $tp_tva (float) total page VAT
|
||||
protected $tp_tvac; //!< $tp_tvac (float) total page full price All Tax Incl.
|
||||
protected $tp_priv;//!< $tp_priv (float) total page personal expense
|
||||
protected $tp_nd;//!< $tp_nd (float) total page price w/o VAT
|
||||
protected $tp_tva_np;//!< $tp_tva_np (float) total page not deductible
|
||||
|
||||
|
||||
public function __construct(\Database $p_cn,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Print_Ledger_Detail extends Print_Ledger
|
|||
public function __construct (Database $p_cn , Acc_Ledger $ledger,$p_from,$p_to)
|
||||
{
|
||||
|
||||
parent::__construct($p_cn,'L', 'mm', 'A4',$ledger,$p_from,$p_to,'all');
|
||||
parent::__construct($p_cn,'P', 'mm', 'A4',$ledger,$p_from,$p_to,'all');
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -79,12 +79,12 @@ class Print_Ledger_Detail extends Print_Ledger
|
|||
$array=$this->get_ledger()->get_operation($this->get_from(),$this->get_to());
|
||||
|
||||
$this->SetFont('DejaVu','BI',7);
|
||||
$this->write_cell(215,7,'report Débit',0,0,'R');
|
||||
$this->write_cell(155,7,'report Débit',0,0,'R');
|
||||
$this->write_cell(30,7,nbm($rap_deb),0,0,'R');
|
||||
$this->line_new(4);
|
||||
$this->write_cell(215,7,'report Crédit',0,0,'R');
|
||||
$this->write_cell(155,7,'report Crédit',0,0,'R');
|
||||
$this->write_cell(30,7,nbm($rap_cred),0,0,'R');
|
||||
$this->line_new(4);
|
||||
$this->line_new(10);
|
||||
|
||||
// print all operation
|
||||
for ($i=0;$i< count($array);$i++)
|
||||
|
|
@ -92,13 +92,14 @@ class Print_Ledger_Detail extends Print_Ledger
|
|||
$this->SetFont('DejaVuCond','B',7);
|
||||
$row=$array[$i];
|
||||
|
||||
$this->write_multi(20,3,$row['pj']);
|
||||
$this->write_cell(15,7,$row['date_fmt']);
|
||||
$this->write_cell(20,7,$row['internal']);
|
||||
$this->write_multi(170,3,$row['comment']);
|
||||
$this->write_cell(20,7,nbm($row['montant']),0,0,'R');
|
||||
$this->write_multi(20, 4,$row['pj'],'T');
|
||||
$this->write_cell(15,4,$row['date_fmt'],'T');
|
||||
$this->write_cell(20,4,$row['internal'],'T');
|
||||
$this->write_multi(100,4,$row['comment'],'T');
|
||||
$this->write_cell(40,4,nbm($row['montant']),'T',0,'R');
|
||||
|
||||
|
||||
$this->line_new();
|
||||
$this->line_new(7);
|
||||
// get the entries
|
||||
$aEntry=$this->cn->get_array("select j_id,j_poste,j_qcode,j_montant,j_debit, j_text,".
|
||||
" case when j_text='' or j_text is null then pcm_lib else j_text end as desc,".
|
||||
|
|
@ -126,7 +127,7 @@ class Print_Ledger_Detail extends Print_Ledger
|
|||
}
|
||||
else
|
||||
$name=$entry['desc'];
|
||||
$this->write_cell(150,6,$name,0,0,'L');
|
||||
$this->write_cell(100,6,$name,0,0,'L');
|
||||
|
||||
// print amount
|
||||
$str_amount=nbm($entry['j_montant']);
|
||||
|
|
@ -134,6 +135,7 @@ class Print_Ledger_Detail extends Print_Ledger
|
|||
{
|
||||
$this->write_cell(20,6,$str_amount,0,0,'R');
|
||||
$this->write_cell(20,6,'',0,0,'R');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -142,6 +144,7 @@ class Print_Ledger_Detail extends Print_Ledger
|
|||
}
|
||||
$this->line_new(4);
|
||||
}
|
||||
$this->line_new(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ class Print_Ledger_Financial extends Print_Ledger
|
|||
{
|
||||
private $rap_amount; /* amount from begining exercice */
|
||||
private $tp_amount; /* amount total page */
|
||||
private $jrn_type; //!< $jrn_type (VEN,ACH,ODS,FIN) ledger type
|
||||
|
||||
function __construct(Database $p_cn, Acc_Ledger $p_jrn,$p_from,$p_to)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,28 +33,7 @@
|
|||
class Print_Ledger_Simple extends \Print_Ledger
|
||||
{
|
||||
|
||||
private $a_Tva; //!< $a_Tva array ( tva_id,tva_label,tva_poste ) of existing_vat
|
||||
private $rap_tva; //!< $rap_tva array(tva_id,amount)
|
||||
private $rap_other_tax; //!< $rap_other_tav, amount to report for other tax than VAT
|
||||
private $jrn_type;//! $jrn_type (string) 'VEN','ACH','ODS','FIN'
|
||||
private $previous;//! $previous (array) see Acc_Ledger->previous_amount
|
||||
private $other_tax_previous;//! $other_tax_previous (array)
|
||||
//see Acc_Ledger->previous_other_tax
|
||||
private $rap_htva; //!< $rap_htva (float) previous price w/o VAT
|
||||
private $rap_tvac; //!< $rap_tvac (float) previous amount
|
||||
//All Tax Include (full price)
|
||||
private $rap_priv; //!< $rap_priv (float) personal expense
|
||||
private $rap_nd; //!< $rap_nd (float) $no-deductible tax
|
||||
private $rap_tva_np; //!< $rap_tva_np VAT not deductible
|
||||
private $flag_other_tax; //!< $flag_other_tax(bool) true if other tax exists
|
||||
private $tp_htva; //!< $tp_htva (float) total page price w/o VAT
|
||||
private $tp_tva; //!< $tp_tva (float) total page VAT
|
||||
private $tp_tvac; //!< $tp_tvac (float) total page full price All Tax Incl.
|
||||
private $tp_priv;//!< $tp_priv (float) total page personal expense
|
||||
private $tp_nd;//!< $tp_nd (float) total page price w/o VAT
|
||||
private $tp_tva_np;//!< $tp_tva_np (float) total page not deductible
|
||||
private $tp_other_tax;//!< $tp_other_tax (float) other tax
|
||||
|
||||
|
||||
public function __construct ($p_cn, Acc_Ledger $p_jrn,$p_from,$p_to,$p_filter_operation)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ class AccountRepositoryTest extends TestCase {
|
|||
|
||||
/**
|
||||
* @testdox create a repository
|
||||
* @backupGlobals disabled
|
||||
*/
|
||||
function testCreate() {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* @covers Fiche
|
||||
*
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Acc_Ledger_PurchaseTest extends TestCase
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* @backupGlobals enabled
|
||||
* @coversDefaultClass Acc_Ledger_Sale
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Acc_Ledger_SaleTest extends TestCase
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* @backupGlobals enabled
|
||||
*/
|
||||
require DIRTEST.'/global.php';
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class Acc_LetterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* Generated by PHPUnit_SkeletonGenerator on 2016-02-13 at 00:41:50.
|
||||
* @backupGlobals enabled
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Acc_OperationTest extends TestCase
|
||||
{
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* @coversDefaultClass \Follow_Up_Detail
|
||||
*/
|
||||
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class Follow_Up_DetailTest extends TestCase
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* @backupGlobals enabled
|
||||
*/
|
||||
require DIRTEST.'/global.php';
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class PDF_Anc_Acc_ListTest extends TestCase
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* @brief concerne print_LedgerTest
|
||||
* @coversDefaultClass Print_Ledger
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class print_LedgerTest extends TestCase
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use PHPUnit\Framework\TestCase;
|
|||
* @coversDefaultClass Print_Ledger_Detail
|
||||
*/
|
||||
require DIRTEST.'/global.php';
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class Print_Ledger_DetailTest extends TestCase
|
||||
{
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue