Jump to content

Edit Proforma Invoice Via Invoices Model Cause Invoice Status To Active Invoice


Recommended Posts

Posted

we have a voided invoice .
 
when we  add a public_note via invoices model to a voided invoice ,  the invoice status back to active .
 
the code used is :

$this->Invoices->edit($invoice_id, array('note_public' => "test a note"));

NOTE : the invoice type is proforma .
NOTE 2 : tested with invoice an active proforma .

so any proforma invoice when e edit it via the model invoice with out set the invoice status , it convert to active invoice even if is not tottaly paid .

Posted

the bug is related to function getNextInvoiceVars()  n this code

elseif ($vars['status'] == "proforma" || (($new || (isset($vars['prev_status']) && in_array($vars['prev_status'], array("void", "draft")))) && $client_settings['inv_type'] == "proforma")) {
   $vars['status'] = "proforma";
   $inv_format = $client_settings['inv_proforma_format'];
   $inv_start = $client_settings['inv_proforma_start'];
  }

the function return back the status to proforma and remove the void status .

  • 2 weeks later...
Posted

UPDATE :

the bugs is not related only to voided proforma, also to active proforma invoice .

if the status is not set in the $vars , the invoice is converted to active invoice .

this will cause a serious law problems for us , as proforma is not paid and converted to invoice, the client is required to pay it even if he doesn't want to renew or pay the services the proforma is for . and the client claim because they have not yet decided to pay or not , and we issue them a invoice without their acceptance .
 

we are working a lot with invoice model , to edit private/public notes, date due ... ect

 

PLEASE A QUICK FIX AS SOON AS POSSIBLE .

  • 2 weeks later...
Posted

Is this an issue from the UI in Blesta, or when you pass your own call to Invoices::edit? If the latter, it sounds like the work-around is to always set the invoice status.

Posted

As mentioned in my first post . This is for using the invoice model .

 

Passing status with the vars will cause a new database request for get() .

So i prefer in some cases only work with one shoot :)

  • 7 months later...
Posted

this issue has caused a serious problems .

when we set a note to a voided proforma invoice it back again to open status even if we set status to void in the call

$this->Invoices->edit($invoice_id, [
			'note_public' => "Some Note",
			'status' => "void"
		]);

how to reproduce the case,

void a proforma invoice, via a model call the above code . the proforma invoice status back to open !!!!

Posted

this issue  has more thing to review .....

editing a proforma via Invoices->edit(); change the proforma status to invoice . let say we want to add public_note to proforma , , a change via the model convert the proforma to invoice !!!

 

        $this->Invoices->edit($invoice_id, ['note_public' => "puvlic note here");

 

i think is so logical do not change the status if no status was passed to $vars !? really we have understand the logic of blesta team about changing invoices/proforma .!

 

 

Posted
2 hours ago, Blesta Addons said:

this issue  has more thing to review .....

editing a proforma via Invoices->edit(); change the proforma status to invoice . let say we want to add public_note to proforma , , a change via the model convert the proforma to invoice !!!

 

        $this->Invoices->edit($invoice_id, ['note_public' => "puvlic note here");

 

i think is so logical do not change the status if no status was passed to $vars !? really we have understand the logic of blesta team about changing invoices/proforma .!

 

 

Did this work in 3.6? I don't think we changed anything to do with proforma invoices in v4.

Posted

Firstly we have thinked that this issue is linked to blesta addons plugin , but it seem related to core invoice .

Normally we have a plugin that we use to add comment to a voided proforma, and we  have found every commented proforma back to open.

Posted

Who use the plugin "cancel unpaid order" with proforma enabled also concerned with this issue . we will try to make a temporary fix without touching the core files . but this issue should be fixed by the core.

i think is time to implement the TRUE EU invoices system now .

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...