BambooInvoice Forums

Edit Closed Invoice

 
Total Posts: 6

Hello,
    I ahve just installed BambooInvoice and it’s great so far.

My needs for it are just to be able to track what pc repair work I do for friends, family and local people.  Nothing major.

I need to be able to edit a closed invoice so i can alter details.

Please let me know how I can do it?

Thanks

Regards,
Neil

Total Posts: 2324

Welcome to Bamboo Neil. Have you had a chance to search these forums? I think you’ll find its been answered a few times in the past.

Total Posts: 6

Ok, So I would have to delete the payment directly in the database. This isn’t very intuitive or user friendly at all. Is there any way that a “Reopen Invoice” link could be added so we can alter the invoice and then reclose it. Even if you could provide the code for me to insert if you don;t wnat it in the main product then it would be highly appreciated.

This is the best software I have found for my needs and would like to be able to keep using it.

Thanks

Regards,
Neil

Total Posts: 2324

Yeah, agreed that it isn’t the best approach, but it is what is there right now. Down the road this is certainly something I’d like to get added in there.

I can help you with the code, but first can you describe your experience level to me. Have you ever used CodeIgniter, and/or are you familiar with MVC coding?

Total Posts: 6

Hey,
  I would love to get this feature added. Unfortunatley I ahve never used CodeIgniter and am not familiar with MVC Coding but have done quite a bit of PHP development in the past. So should be able to follow along pretty easily.

Thanks

Regards,
Neil

Total Posts: 2324

Thanks for your enthusiasm. I don’t have the time right now to write up a tutorial on this though, so I’ve added it to the que to get looked at. Thanks.

Total Posts: 36

Hi
If you edit bamboo_system_files/application/views/header.php and change line 125 from

<?php if ($row->amount_paid < $row->total_with_tax): ?>

to

<?php if (1==1): ?>

The edit button wont get filtered out of the menu on closed invoices.
This works and I can’t see any obvious problems with editing closed invoices this way but I’ve only lightly tested it.
Cheers
Felix

Total Posts: 36

Better solution is to put this code below line 127 and that will put a “Reopen Invoice” button there instead for closed invoices.

<?php if ($row->amount_paid >= $row->total_with_tax): ?>
              <li><?php echo anchor(‘invoices/edit/’.$row->id, ‘Reopen Invoice’, array(‘class’ => ‘invedit’));?></li>
<?php endif; ?>

Total Posts: 6
felix - Mar 04, 2010 11:00am

Better solution is to put this code below line 127 and that will put a “Reopen Invoice” button there instead for closed invoices.

<?php if ($row->amount_paid >= $row->total_with_tax): ?>
              <li><?php echo anchor(‘invoices/edit/’.$row->id, ‘Reopen Invoice’, array(‘class’ => ‘invedit’));?></li>
<?php endif; ?>

Hey, Thanks for the replies. I added that snippet below line 127 in header.php but I receive the error when trying to access http://www.mydomain.co.uk/bambooinvoice

Parse error: syntax error, unexpected T_STRING in /home/rctneil/public_html/bambooinvoice/bamboo_system_files/application/views/header.php on line 130

A snippet of code around the area I added is:

<?php if ($row->amount_paid < $row->total_with_tax): ?>
              <li><?php echo anchor(‘invoices/edit/’.$row->id, $this->lang->line(‘menu_edit_invoice’), array(‘class’ => ‘invedit’));?></li>
          <?php endif; ?>
         
          <?php if ($row->amount_paid >= $row->total_with_tax): ?>
          <li><?php echo anchor(‘invoices/edit/’.$row->id, ‘Reopen Invoice’, array(‘class’ => ‘invedit’));?></li>
          <?php endif; ?>

        <li><?php echo anchor(‘invoices/duplicate/’.$row->id, $this->lang->line(‘menu_duplicate_invoice’), array(‘class’ => ‘invduplicate’));?></li>

        <li><?php echo anchor(‘invoices/delete/’.$row->id, $this->lang->line(‘menu_delete_invoice’), array(‘class’=>‘lbOn deleteConfirm’));?></li>

        <?php endif; ?>

That is line 125 to 137

Total Posts: 36

It could be from copying and pasting from this forum so unzip and rename the text file attached to a php file and replace your header file with that and retest.

File Attachments
header.zip  (File Size: 3KB - Downloads: 45)
Total Posts: 6

It’s letting me access the system now but the stylesheets are not being used, no images are displaying and when i click to view all invoices, the page shows but I gee a division with the following error in it:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: short_description

Filename: invoices/invoice_table.php

Line Number: 49

Total Posts: 36

Then I suggest you replace the header.php with the original unchanged file and see if works, then after everything is working properly try to just make the first change I suggested to alter line 125

Total Posts: 6

Excellent, works great so far.

I think one problem i am having is that as I am not a proper business, I am using this more to track what work I ahve done for people. No payment terms, are needed or any of that so I am ignoring it but it does a much better job than keeping everything in a text file.

I know that this is a shot in the dark but currently, I have not assigned costs to some of thr work I have completed for some people, therefore I have just added a misc cost of £999 to those clients where cost is to be determined and added in at a later date. Is there a way that something can be added so that I can mark an invoice as “To be determined Later” so I can added prices for the work after?

If not then I can keep working with it as it is. It just helps me to keep track of things a little better

Total Posts: 36

I’ve just fixed that header.php file I attached earlier, it must have got screwed some how when I converted it to text. Try it downloading it again.

Total Posts: 36

cool, like this i could manually fix some invoices that where closed but kept showing under open invoices