Page 1 of 2

Pizza Tutorial missing in video

Posted: Wed Dec 09, 2020 12:53 pm
by apmuthu
Ref: Pizza Video Tutorial 3
https://www.youtube.com/watch?v=40aWH3Gqn28

After setting up the invoice table's fast form, the part where the Customer is looked up is missing.

Even after manually doing all the steps, I see that the customer_id is being displayed and something is amiss in the invoice form as well where the lookedup value is shown in the right and the customer-id is being displayed!

Re: Pizza Tutorial missing in video

Posted: Wed Dec 09, 2020 2:11 pm
by kev1n

Re: Pizza Tutorial missing in video

Posted: Wed Dec 09, 2020 2:26 pm
by apmuthu
Yes.

There seem to be several sets of objects pertaining to invoice and item in the objects table.
Also the date on the invoice data is set to the year 1919 instead of 2019.

Actually, just the data pertaining to the tutorial should have been there for non cluttered understanding.

Re: Pizza Tutorial missing in video

Posted: Tue Dec 15, 2020 9:40 am
by apmuthu
Had to alter it to cus_name (both Code and Description) after making and SQL in the SQL Builder for the inv_customer_id field as:

Code: Select all

SELECT
    invoice.inv_date,
    invoice.inv_number,
    invoice.inv_grand_total,
    customer.cus_name

FROM
    invoice
        JOIN customer ON customer.customer_id = invoice.inv_customer_id
If the Code and Description are the same in any Lookup definition, then the right side display of the Description should be suppressed in the nubuilder4 code itself instead of needing any js code. What is the standard js code in such a case in the meanwhile to suppress the Description display in the form?

Re: Pizza Tutorial missing in video

Posted: Tue Dec 15, 2020 10:47 am
by admin
Hi,

Give this a go:

Code: Select all

nuHide('inv_customer_iddescription');
Could you log an issue on Github (as improvement)? Thanks a lot!

Re: Pizza Tutorial missing in video

Posted: Tue Dec 15, 2020 2:03 pm
by apmuthu
Whilst this does work in the AfterBrowse js code, the fact remains that the Description still shows up when a record is taken in for edit and the form is displayed anew.

Is there any documentation as to how each field is referred to in the js code?

Re: Pizza Tutorial missing in video

Posted: Tue Dec 15, 2020 3:35 pm
by apmuthu
@kev1n: Thanks.
The custom code did it.

Code: Select all

if (nuFormType() == 'edit') {
    nuHide('inv_customer_iddescription');
}

Re: Pizza Tutorial missing in video

Posted: Fri Dec 18, 2020 2:15 am
by steven
apmuthu,

You can hide the Description by setting its length to 0.


Steven

Re: Pizza Tutorial missing in video

Posted: Fri Dec 18, 2020 7:44 am
by apmuthu
@steven: Thanks. An example js / php code snippet and screenshot would be useful.

@kev1n: Thanks for indicating the browser console to identify the field name like inv_customer_iddescription

Re: Pizza Tutorial missing in video

Posted: Fri Dec 18, 2020 7:22 pm
by steven
apmuthu,

Setting Width to 0 will hide the Description field.
descw.png

Steven