Topic: Unable to Edit or Void a Credit Note

By mistake I entered a Credit Note (CN) in Supplier A100 account, which should have gone into Supplier M100 account.

Now I am unable to edit the CN even though it shows up in the Supplier Transaction Enquiry. When I click the Edit icon, it opens the Suppliers Credit Note Screen with the right Supplier Account, but no figures.

How can I void the CN, if I am unable to edit it?

Thanks.
/TOR

Re: Unable to Edit or Void a Credit Note

Setup -> Void Transaction -> Transaction Type: Supplier Credit Note -> Search and choose the one you want and void it.

A Credit Note will have the GL entry(table: gl_trans) type=21 and the Accounts Payable (2100 in en_US-new/demo CoA) with person_type_id=3 and the actual person_id being the id of the supplier. This will also bear an entry in the supp_trans, supp_invoice_items and audit_trail tables as well.

On voiding, the amounts get zeroed out in the supp_invoice_items, supp_trans, gl_trans tables for the specific record(s).

The anatomy of the Void of a Supplier Credit Note is discerned from the diff between the pre and post void backups:

--- fa24_1_pre-void_backup.sql    Mon Oct 23 09:18:59 2017
+++ fa24_1_post-void_backup.sql    Mon Oct 23 09:19:56 2017

-insert  into `1_audit_trail`(`id`,`type`,`trans_no`,`user`,`stamp`,`description`,`fiscal_year`,`gl_date`,`gl_seq`) values 
-  (32,21,1,1,'2017-10-23 09:12:19','',2,'2017-10-23',0);
+insert  into `1_audit_trail`(`id`,`type`,`trans_no`,`user`,`stamp`,`description`,`fiscal_year`,`gl_date`,`gl_seq`) values 
+  (32,21,1,1,'2017-10-23 09:19:10','',2,'2017-10-23',NULL)
+ ,(33,21,1,1,'2017-10-23 09:19:10','Voided.\n',2,'2017-10-23',0);

-insert  into `1_gl_trans`(`counter`,`type`,`type_no`,`tran_date`,`account`,`memo_`,`amount`,`dimension_id`,`dimension2_id`,`person_type_id`,`person_id`) values 
-  (41,21,1,'2017-10-23','2100','',25,0,0,3,'1')
- ,(42,21,1,'2017-10-23','5010','Test Supplier CN',-25,0,0,NULL,NULL);
+insert  into `1_gl_trans`(`counter`,`type`,`type_no`,`tran_date`,`account`,`memo_`,`amount`,`dimension_id`,`dimension2_id`,`person_type_id`,`person_id`) values 
+  (41,21,1,'2017-10-23','2100','',0,0,0,3,'1')
+ ,(42,21,1,'2017-10-23','5010','Test Supplier CN',0,0,0,NULL,NULL);

-insert  into `1_supp_invoice_items`(`id`,`supp_trans_no`,`supp_trans_type`,`gl_code`,`grn_item_id`,`po_detail_item_id`,`stock_id`,`description`,`quantity`,`unit_price`,`unit_tax`,`memo_`,`dimension_id`,`dimension2_id`) values 
-  (2,1,21,'5010',-1,0,'','',0,-25,0,'Test Supplier CN',0,0);
+insert  into `1_supp_invoice_items`(`id`,`supp_trans_no`,`supp_trans_type`,`gl_code`,`grn_item_id`,`po_detail_item_id`,`stock_id`,`description`,`quantity`,`unit_price`,`unit_tax`,`memo_`,`dimension_id`,`dimension2_id`) values 
+ ,(2,1,21,'5010',-1,0,'','',0,0,0,'Test Supplier CN',0,0);

-insert  into `1_supp_trans`(`trans_no`,`type`,`supplier_id`,`reference`,`supp_reference`,`tran_date`,`due_date`,`ov_amount`,`ov_discount`,`ov_gst`,`rate`,`alloc`,`tax_included`) values 
-  (1,21,1,'001/2017','ABC_112','2017-10-23','2017-10-23',-25,0,0,1,0,0);
+insert  into `1_supp_trans`(`trans_no`,`type`,`supplier_id`,`reference`,`supp_reference`,`tran_date`,`due_date`,`ov_amount`,`ov_discount`,`ov_gst`,`rate`,`alloc`,`tax_included`) values 
+ ,(1,21,1,'001/2017','ABC_112','2017-10-23','2017-10-23',0,0,0,1,0,0);
 
+insert  into `1_voided`(`type`,`id`,`date_`,`memo_`) values 
+  (21,1,'2017-10-23','');
Post's attachments

Void_Sup_CN.png 19.2 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

3 (edited by TOR 10/23/2017 12:54:20 pm)

Re: Unable to Edit or Void a Credit Note

Thank you so much apmuthu. Appreciate it.

So there is no way we can edit a credit note?

Also, when I "edit" the CN from Supplier Transaction Enquiry page, why doesn't it show the whole CN Form? FA2.4 ONLY shows the Combo box for Supplier, but doesn't do anything further.

/TOR

Re: Unable to Edit or Void a Credit Note

The Supplier Credit Note is editable in a fully working install of FA 2.4.2+.
My earlier email listed the db changes in the Voiding of a Supplier Credit Note.
It appears that your install is broken.

Re: Unable to Edit or Void a Credit Note

I have installed FA 2.4.2 as modified on 30-07-2017. Is 2.4.2+ a higher version?

Moreover, at the time of install, i did not encounter any error or alert that the instal may not be complete. But you do have a point. Let me try re-installing it.

Thank.
/TOR

Re: Unable to Edit or Void a Credit Note

The last time FA was updated was on 13th Oct 2017 as on date.

Re: Unable to Edit or Void a Credit Note

Thanks. Will try to download that.

Re: Unable to Edit or Void a Credit Note

We have downloaded FA fresh version 2.4.2 (13 October, 2017) from source forge and tried replacing "supplier_credit.php" file from the newly downloaded version.

It doesn't seems to work page "http://abc.com/purchasing/supplier_credit.php?ModifyCredit=4" page loads but doesn't show anything. Kindly click the below URL to see the response received.

http://www.webmekanics.com/projects/fa/ … t-page.jpg

Thanks.
/TOR

Post's attachments

chrome-screenshot-show-unable-to-load-credit-note-edit-page.jpg 22.5 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Unable to Edit or Void a Credit Note

Does it work okay from FireFox or from some other PC? This is clearly some php setting or apache conf setting that may be at fault. Do a complete check of all files for differences with the core.

Re: Unable to Edit or Void a Credit Note

Tried everything, but all in vain.

The Edit Supplier Credit Note routine is behaving very erratic. Firefox behaviour is the same as Chrome.

This is what I am trying to do now:

1. Supplier Enquiry
2. Credit Notes Only
3. Click Edit icon of a particular credit note
4. A new screen opens which was the last screen I opened to edit a Purchase Invoice.

I think whats happening is, that whenever we open EDIT SUPPLIER CREDIT NOTE, it opens up the last opened INVOICE that was edited. If No Invoice has been EDITED, it opens the New Credit Note screen with the first supplier in the list.

I am sure this is a Bug! Try to issue a credit note first in the Demo 2.4.1 on Frontaccounting.com and then try to EDIT that credit note.

Re: Unable to Edit or Void a Credit Note

Works as expected for Customer Credit Note Edit.

1. Create a Credit Invoice  for 3 items (Payment Terms: Not Cash Invoice as it will have a Cash payment entry automatically made)
2. Create a Credit Note for 1 item returned
3. Create a payment for 1 item and allocate it to the Invoice
4. Edit earlier Credit Note and make it as 2 items returned
5. Allocate the Credit Note to the Invoice
6. The settled Invoice will show it's fulfillment transactions as okay.

Attached is the sequence of operations documents.

The same sequence should suffice for a Supplier Txn.

Possible bug in the Supplier Credit Note Edit - each edit makes a separate Credit Note!

Also getting:

Rounding error -0.01 encountered for trans_type:11,trans_no:1
Post's attachments

CN_Edit_Txns.zip 50 kb, 2 downloads since 2017-10-30 

You don't have the permssions to download the attachments of this post.

Re: Unable to Edit or Void a Credit Note

It appears that the URL parameter ModifyCredit for editing a Supplier Credit Note is not doing anything and only a new credit note by default shows up in purchasing/supplier_credit.php.

Changing lines 33-34 of purchasing/supplier_credit.php:

if (isset($_GET['ModifyCredit']))
    check_is_editable(ST_SUPPINVOICE, $_GET['ModifyCredit']);

to:

if (isset($_GET['ModifyCredit'])) {
    if (isset($_GET['invoice_no'])) {
        check_is_editable(ST_SUPPINVOICE, $_GET['ModifyCredit']);
    } else {
        check_is_editable(ST_SUPPCREDIT, $_GET['ModifyCredit']);
        $help_context = "Supplier Credit Note";
        $_SESSION['page_title'] = _("Supplier Credit Note Edit");
        $_SESSION['supp_trans'] = new supp_trans(ST_SUPPCREDIT, $_GET['ModifyCredit']);
    }
}

brought up the correct Supplier Credit Note to edit but it was not editable (see attachment).

@joe: Supplier Credit Note cannot be edited in FA if this code is not filled.

Post's attachments

EditSuppCN_page.png 48.7 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Unable to Edit or Void a Credit Note

Thanks for helping us in resolving the bug in modifying supplier credit note entry. However my initial issue still remain outstanding as we can't modify the supplier because that is where the error was made. Please see attached image.

Secondly you have already pointed out the edit for any single line item should be there. How do you attach screenshots by the way. smile

http://www.webmekanics.com/projects/fa/ … t-note.jpg

Post's attachments

modify-supplier-credit-note.jpg 105.5 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Unable to Edit or Void a Credit Note

Attachments are a privilege permission set by the board admin.
Screenshots of web pages with mostly text are best captured in PNG format for small size and less pixelation on enlargement.

Void the Supplier Credit Note in the Setup tab and then enter a new one.

Re: Unable to Edit or Void a Credit Note

Janusz is working on this.

/Joe