Recurrence view

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1610
    nsn
    Participant

    Hello,

    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

    #1612
    RRowley
    Participant

    You would need to create an extension, probably best for the module/cron/manage.php and the templates/default/cron/manage.tpl. In the php file, take the table retrieved from the Cron::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 the manageTable() 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.

    #1615
    nsn
    Participant

    Thank you for the advise.

    Would it be possible to help me a little with the code ?

    #1617
    RRowley
    Participant

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

    #1638
    nsn
    Participant

    Thank 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.