Question about templates for PDF output

SimpleInvoices Group Forum Forums Fearless359 SimpleInvoices Discussion Group Question about templates for PDF output

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #2250
    marcnyc
    Participant

    Thank you for responding and for your suggestion.

    I’ve tried doing what you suggest and I’ve added the line:

    ‘custom_field1’ => $row[‘custom_field1’],`

    around line 215 in the Inc/Claz/Invoice.php file that I’ve copied into my extensions folder, like so:

                $tableRows[] = [
                    'action' => $action,
                    'index_id' => $row['index_id'],
                    'custom_field1' => $row['custom_field1'],
                    'customer' => $row['customer'],
                    'preference' => $row['preference'],
                    'date' => $row['date'],
                    'total' => $row['total'],
                    'owing' => isset($row['status']) ? $row['owing'] : '',
                    'aging' => $row['aging'] ?? '',
                    'currency_code' => $row['currency_code'],
                    'locale' => preg_replace($pattern,'$1-$2', $row['locale'])
                ];

    …but I am still getting the same error…
    do I need to add a custom_field1 line anywhere else in this file?

    #2251
    marcnyc
    Participant

    I did a bit more digging…
    …your solution works but copying the Inc/Claz/Invoice.php to the extensions directory does NOT work… maybe it’s a bug in the code but the php file is not included…
    I know this because if I made the changes on root/Inc/Claz/Invoice.php file then your soltuion works but if I leave that file un-edited and I put my modified version in root/extensions/MYextension/Inc/Claz/Invoice.php it does not work…
    I’ve also tried putting it in:
    root/extensions/MYextension/templates/Inc/Claz/Invoice.php
    and in:
    root/extensions/MYextension/modules/Inc/Claz/Invoice.php

    None of the locations call the new file in Inc/Claz

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.