SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Recurrence view
Tagged: cron, extension., recurrence
- This topic has 4 replies, 2 voices, and was last updated 4 years ago by
nsn.
-
AuthorPosts
-
November 8, 2021 at 1:55 am #1610
nsn
ParticipantHello,
I’ve a question about the page “index.php?module=cron&view=manage”
Like to see also the total amount in this view. I can make the “owing” vissible but can not get the total amount (it’s in the table invoice_items and need to be calculated somehow).Anyone that can help me out ?
NSN
November 10, 2021 at 7:41 am #1612RRowley
ParticipantYou would need to create an extension, probably best for the
module/cron/manage.phpand thetemplates/default/cron/manage.tpl. In the php file, take the table retrieved from theCron::manageTable(), loop through it making a new table. For each record you would use the invoice number to get the invoice record, take the total from it and add it to themanageTable()row, creating a new array of records to then store in the DataTable. Now you would have the value to display on the screen by adding it the the table heading and DataTable info in tpl file.You do this as an extension so the code can be preserved when new SI updates are loaded.
November 15, 2021 at 11:25 am #1615nsn
ParticipantThank you for the advise.
Would it be possible to help me a little with the code ?
November 16, 2021 at 7:38 am #1617RRowley
ParticipantAs a matter of fact, I used this scenario to help document how to make an extension. I’ve attached a zip file that contains the files for the module.
Download the zip file and extract it into extensions directory. Next go to the Settings tab and select the Customize menu option. On the Customize screen, select the Extensions option. You should see the cronInvoiceTotal extension. Select the leaf on the left to register the module. Then select the light switch on the left to enable the module. Now if you access the Recurrence screen, the invoice total should be present.
Let me know how this works.
Attachments:
January 26, 2022 at 2:02 am #1638nsn
ParticipantThank you for the code… I’m using 2018.2.8_1 so i can not directly use your code. Can i upgrade from this version to the version needed ?
My list is generated by xml not json -
AuthorPosts
- You must be logged in to reply to this topic.
Recent Comments