Jump to content
  • 0

Force reprint


cualliohtli

Question

So, migrated all invoices and clients from WHMCS to Blesta 4 (currently trying the beta out for kinks). Migration was complicated as there is no migration tool, but with some minor modifications to DB, and some manual imports, managed to stitch it together.

Current issue is printing old invoices. None of them show on the Print Queue and aside from unapplying all transactions, adding the "paper" deliver along, saving and then reapplying the payments for each invoice, can't find another way to force reprint or even add them to the queue en-masse. We have on this test system over 1000 invoices form the import from WHMCS, so on actual operation this would be insanity.

The DB has "invoice_delivery" but that is only for invoices generated AFTER the import, can't find where the same flag goes for invoices already paid, closed and from the import.

Any idea as to how we can force all invoices to show on the Print Queue?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Hi there there is a import tool for WHMCS on Blesta or do you mean you can't select what to import? And as for the main question I don't think you can unless the invoice_delivery can be used to add the invoices and put them as "paper". But that would need a bit of editing so a report could work if you know mysql to find the invoice_id for the imported ones.

Link to comment
Share on other sites

  • 0

Sorry about the garbled message. First part was background, I had trouble importing from WHMCS 6 to Blesta 4 (which is expected given the importer is not meant for those two). I fixed all errors caused by the imperfect import, but wonder if that may have something to do with not being able to print any past invoices.

My big concern is I want to be able to print all invoices. Many of which were closed without the "paper" deliver option or were imported from WHMCS.

So the question is if anyone knows a way to force ALL invoices on the system into the print queue, even (and especially) when they came from imported invoices and refuse to show on the queue?

I am not afraid of some SQL or PHP, and been trying around, but not sure where Blesta marks invoices to be sent to the queue or where to change the delivery to paper for old invoices as the table of invoice_delivery only has the items created after the import.

I could dig into the ID of the old ones. Then I guess I have to add them all to the invoice_delivery table and set them as paper. Is this what you suggest?

Link to comment
Share on other sites

  • 1
16 minutes ago, cualliohtli said:

I could dig into the ID of the old ones. Then I guess I have to add them all to the invoice_delivery table and set them as paper. Is this what you suggest?

Correct under Billing > Reports > Custom you can set a SQL so you can grab the invoice IDs and remove the ones in the table unless you can work out how to do this: Grab the invoice_id's from the invoices table only if they aren't in the invoice_delivery table. Paul would be able to help more when he's online :)

Link to comment
Share on other sites

  • 1

If you want invoices to be queued for print so they appear under Billing > Print Queue to be printed and marked as printed, you need to add 1 record for each invoice to the invoice_delivery table.

id    invoice_id    method    date_sent
80   63               paper       NULL

In this case, 80 is an auto incrementing ID, invoice_id is the invoices.id for the invoice you want to print, paper is the method (alternatively email), and date_sent should be NULL. Test it with a few and you'll see them appear under Billing > Print Queue. A bit of a warning on this though, it may be troublesome to generate a PDF of thousands of invoices at once.

Link to comment
Share on other sites

  • 0

Thanks Paul and Michael. Been working on getting those invoice_id's. The number of invoices is not in the thousands, but in the hundreds, but we can break that down into tenths.

We used to get a one PDF with all invoices of the year from WHMCS, then print them and then we had to manually sort them out as WHMCS always does whatever it wants. This is for taxes, so, fun times.

Seems like we have a bit of manual labor ahead. What would we ever do without search and replace!

Link to comment
Share on other sites

  • 1
6 hours ago, cualliohtli said:

Thanks Paul and Michael. Been working on getting those invoice_id's. The number of invoices is not in the thousands, but in the hundreds, but we can break that down into tenths.

We used to get a one PDF with all invoices of the year from WHMCS, then print them and then we had to manually sort them out as WHMCS always does whatever it wants. This is for taxes, so, fun times.

Seems like we have a bit of manual labor ahead. What would we ever do without search and replace!

I've heard of people wanting a copy of all invoices over a specific period of time before. Is this specific to your region/country? Might be a good feature request. I imagine this could be an option under Billing > Print Queue to "Export Invoices" for a given date range (and possibly other filter options), that would generate a single PDF without having to queue the invoices up for print.

Link to comment
Share on other sites

  • 0

I'm Canadian and here in Canada it depends on how you do your taxes. We don't print invoices on daily use since most are sent by email and clients are happy with that, but at the end of the year, it is best to print them all, or at least have a PDF version of all of them for our tax records. So most Canadian businesses would print them. It is a thing that every end of year you have people asking for their invoice and how they can get a printed copy (or a digital version they can print).

So, yeah, I'd say it would qualify as a big feature request in Canada.

What you describe is exactly what we would love to have. The ability to pick a date range and print invoices as needed. Right now Blesta only considers printing to send them out.

I would imagine in the US you would also need the invoices, either in digital or print for your tax records. Or does the system liability and sales report serve that purpose?

Link to comment
Share on other sites

  • 0
28 minutes ago, cualliohtli said:

I would imagine in the US you would also need the invoices, either in digital or print for your tax records. Or does the system liability and sales report serve that purpose?

We use cash basis accounting, so we don't need invoices for tax purposes. Makes sense though!

Link to comment
Share on other sites

  • 0

Canada has both, but at certain point (I think income over 30,000 a year) all businesses have to work on accrual. Invoices are important for us because we pay taxes on when they are generated, not paid. So, our sales for the year are anything invoiced from January 1st to December 31st.

And for some businesses (again based on sales), we have to pay every quarter, so we need to print all invoices within a given quarter.

Is this really hard to implement? Wouldn't it be possible to add the date range selector and have Blesta run a query looking for the invoices created in a specific date range? This would also be like the reports, just, allow invoices to print in the end.

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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...