Topic: Dimension is missing in Supplier Invoice View

Please view the following two images

http://prnt.sc/bwsarq (Supplier Invoice)

http://prnt.sc/bwsam2 (Journal Entry of Supplier Invoice)

You can see that the Dimension is appearing in Journal Entry View but not in Supplier Invoice View.

www.boxygen.pk

Re: Dimension is missing in Supplier Invoice View

It is present in the 3rd field in the lower table in both cases.
Images zipped up in this post.

Post's attachments

Inv_and_glJV.zip 47 kb, 1 downloads since 2016-07-24 

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

Re: Dimension is missing in Supplier Invoice View

@apmuthu the 3rd Field (Dimension Column) Value is null in the lower table in Supplier Invoice View. Please check it carefully.

www.boxygen.pk

4 (edited by apmuthu 07/24/2016 11:36:06 am)

Re: Dimension is missing in Supplier Invoice View

Yes it is blank in both screenshots - probably record did not have any dimension attached. Only in the second line it appears on the JV. How do you want it to be?

Line 288 of purchasing/includes/ui/invoice_ui.inc below is responsible for display of Dimension 1:

                   label_cell(get_dimension_string($entered_gl_code->gl_dim, true));

@joe: is this an error?

Re: Dimension is missing in Supplier Invoice View

Hello,

I cannot reproduce this error. I am testing on 2.3.25.
If you have done some specific entry or changed the entry please advice.

/Joe

Re: Dimension is missing in Supplier Invoice View

Created a Direct Invoice under Purchasing in the Training Co - FA v2.3.25. The dimension appears in the GL View and not in the Invoice. The Dimension is set in the Supplier page and any Dimension can be chosen for the Direct Purchase Invoice during creation time.

What theme are you using - any changes in it's template you have done that may be erroneous or missing data? The standard FA 2.3 theme does not even display the Dimension column for the Supplier Invoice. Please use the Training Co (en_US-demo.sql Chart) for testing and comparing with your specific installs.

Post's attachments

FA_Supp_Dim.zip 62.2 kb, 1 downloads since 2016-07-24 

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

Re: Dimension is missing in Supplier Invoice View

@Joe, you can reproduce this error here on a fresh installation of FA2.3.25.

Before you Login View this screen shot

http://prnt.sc/bwx3l3

Click below to login

http://fa.boxygen.biz/fa2325/purchasing/supplier_invoice.php?AddedID=9

Username: aeronvista
pass: usayed2005

After you Login Please

1. Click View this Invoice
Under the 3rd Column name Dimension you will find No Value but it should have "PNG Job NO 2" as defined in the above screen shot.

2. Click View the General Entry of this invoice
Under the 3rd Column named Dimension you will find value "PNG Job No2" in Second Row.

I hope its clear.

@Apmuthu, i think you have mixed up Supplier Invoices with Direct Invoice. The problem I am reporting is of Supplier Invoice in which a Direct GL entry can be passed against as supplier. While in Direct Invoice Inventory Item needs to be selected.

Regards.

www.boxygen.pk

Re: Dimension is missing in Supplier Invoice View

Yes, I checked the Direct Invoice (Purchases).
http://fa.boxygen.biz/fa2325/purchasing/view/view_supp_invoice.php?trans_no=10

I will now test the Supplier Invoice.

9 (edited by apmuthu 07/25/2016 05:12:42 am)

Re: Dimension is missing in Supplier Invoice View

The gl_trans table has the dimensions data that is displayed in the GL view. The function get_gl_trans() in the file gl/includes/db/gl_db_trans.inc is the source of the displayed field contents of which the dimension data is a part - ie., line 50 in gl/iew/gl_trans_view.php:

$result = get_gl_trans($_GET['type_id'], $_GET['trans_no']);

In the case of the Invoice View, the $supp_trans gets passed by reference through line 36 in purchasing/view/view_supp_invoice.php:

read_supp_invoice($trans_no, ST_SUPPINVOICE, $supp_trans);

The function read_supp_invoice() is in purchasing/includes/db/invoice_db.inc and it does not have any dimension data and hence the absence of values in the dimension columns in the Invoice View!

Also, for each sales invoice item line, all entries pertaining to the gl_trans table will get pulled in if it is joined and records taken. Otherwise, the default value of dimension data in the suppliers table get sucked in erroneously if taken from there.

Sample sql taken from the function read_supp_invoice() and modified to join the gl_trans table :

SELECT supp_trans.*, supp_name, gl.dimension_id, gl.dimension2_id
FROM 1_supp_trans supp_trans LEFT JOIN 1_suppliers USING (supplier_id)
    LEFT JOIN 1_gl_trans gl ON (supp_trans.type=gl.type AND supp_trans.trans_no=gl.type_no)
WHERE supp_trans.trans_no = 11 AND supp_trans.type = 20;

will erroneously produce multiple records for each line item entry of the sales invoice display.

Hence the Dimension column in the Sales Invoice View should be removed - pictures 07 and 08 in the attachment illustrate it.

Post's attachments

PO-Dely-Inv-Pay.zip 266 kb, file has never been downloaded. 

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

Re: Dimension is missing in Supplier Invoice View

Ok, now I understand what the problem is.
In the Sales Invoice display of gl item lines the dimension is not shown. Will have a look at this.

Joe

Re: Dimension is missing in Supplier Invoice View

Finally I could explain you. Joe a little correction is that it is not in Sales Invoice but Supplier Invoices.

www.boxygen.pk

Re: Dimension is missing in Supplier Invoice View

This bug has now been fixed.
Git Repositories for releases 2.3 and 2.4 have been updated.

Link to repository for Release 2.3.25:

Release 2.3.25

Link to reporitory for Release 2.4 RC1:

Release 2.4 RC1

/Joe

13 (edited by apmuthu 07/26/2016 07:01:44 am)

Re: Dimension is missing in Supplier Invoice View

@joe: may need a re-run for FA v2.4 RC1.

Post's attachments

2016-07-26_122841.png 58.6 kb, file has never been downloaded. 

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

Re: Dimension is missing in Supplier Invoice View

Thanks. Fixed.

/Joe