Bug 2358 : operation cloture

This commit is contained in:
sparkyx 2024-05-20 17:25:59 +02:00
parent b8c025c1ba
commit 68208d598a
2 changed files with 4 additions and 4 deletions

View file

@ -85,7 +85,7 @@ select t1.tot_amount
,(select ad_value fd2 from fiche_detail fd2 where fd2.f_id=t1.f_id and fd2.ad_id=23) qcode
,(select fd3.ad_value from fiche_detail fd3 where fd3.f_id=t1.f_id and fd3.ad_id=1) f_name
,abs(t1.tot_amount) atot_amount
,case when tot_amount <0 then 'f' else 't' end debit
,case when tot_amount <0 then 't' else 'f' end debit
from total_account t1
";
$exercice_report=$this->exercice;

View file

@ -92,7 +92,7 @@ class Operation_ExerciceTest extends TestCase
* tearDownAfterClass() template methods is calleafter the last test of the test case class is run,
*
*/
static function tearDownAfterClass(): void
static function atearDownAfterClass(): void
{
global $g_connection;
global $aOperation;
@ -160,11 +160,11 @@ values ($1,$2,$3,$4)",[$operation_id,'4111',$sum_cred-$sum_deb,'t']);
$aOperation[]=$operation_id;
$sum_cred=$g_connection->get_value("select sum(oed_amount)
from operation_exercice_detail where oed_debit='f' and oe_id=$1",[$operation_id]);
$this->assertEquals(813.08,$sum_cred,'Total credit incorrect for operation $operation_id');
$this->assertEquals(1492.89,$sum_cred,'Total credit incorrect for operation $operation_id');
$sum_deb=$g_connection->get_value("select sum(oed_amount)
from operation_exercice_detail where oed_debit='t' and oe_id=$1",[$operation_id]);
$this->assertEquals(1492.89,$sum_deb,'Total debit incorrect for operation $operation_id');
$this->assertEquals(813.08,$sum_deb,'Total debit incorrect for operation $operation_id');
$sum=$g_connection->get_value("select sum(oed_amount)
from operation_exercice_detail where oe_id=$1",[$operation_id]);