This commit is contained in:
Laurent Destailleur
2025-12-02 22:37:49 +01:00
parent 793d846d94
commit e2595b5117
2 changed files with 9 additions and 1 deletions

View File

@@ -5588,7 +5588,8 @@ class Facture extends CommonInvoice
$this->fk_incoterms = 0; $this->fk_incoterms = 0;
$this->location_incoterms = ''; $this->location_incoterms = '';
$this->pos_print_counter = 3; // Already printed 3 times $this->pos_print_counter = 0; // Already printed 0 times
$this->email_sent_counter = 0; // Already sent by email 0 times
$this->status = 0; $this->status = 0;

View File

@@ -91,6 +91,13 @@ class NumberingModulesTest extends CommonClassTest
print __METHOD__." is_erasable=".$result."\n"; print __METHOD__." is_erasable=".$result."\n";
$this->assertGreaterThanOrEqual(1, $result, 'Test for is_erasable, 1st invoice'); // Can be deleted $this->assertGreaterThanOrEqual(1, $result, 'Test for is_erasable, 1st invoice'); // Can be deleted
// We emulate print on invoice 3 times
$localobject->pos_print_counter = 3;
$result = $localobject->is_erasable();
print __METHOD__." is_erasable=".$result."\n";
$this->assertGreaterThanOrEqual(-6, $result, 'Test for is_erasable, 1st invoice already printed'); // Can be deleted
$localobject2 = new Facture($db); $localobject2 = new Facture($db);
$localobject2->initAsSpecimen(); $localobject2->initAsSpecimen();
$localobject2->fetch_thirdparty(); $localobject2->fetch_thirdparty();