Pizza Tutorial missing in video

Questions related to using nuBuilder Forte.

Pizza Tutorial missing in video

Postby apmuthu » Wed Dec 09, 2020 9:23 pm

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!
Attachments
InvCust_All.png
Invoice Customer All Settings
InvCust_All.png (12.08 KiB) Viewed 205 times
CustInv.png
Invoice Customer Lookup
CustInv.png (7.58 KiB) Viewed 205 times
InvCust_Lookup.png
Invoice Customer Lookup Settings
InvCust_Lookup.png (15.09 KiB) Viewed 205 times
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial missing in video

Postby kev1n » Wed Dec 09, 2020 10:41 pm

If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (85)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
nuBuilder Team
 
Posts: 1193
Joined: Mon Oct 15, 2018 2:13 am

Re: Pizza Tutorial missing in video

Postby apmuthu » Wed Dec 09, 2020 10:56 pm

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.
Attachments
testing.zip
Comparision between the tutorial sql and the actual one that is available when manually done.
(15.61 KiB) Downloaded 10 times
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial missing in video

Postby apmuthu » Tue Dec 15, 2020 6:10 pm

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?
Attachments
Lookup_Form_Code_equals_Desc.png
Need to suppress display of Description is it is same as Code in Lookup.
Lookup_Form_Code_equals_Desc.png (15.08 KiB) Viewed 186 times
Pizza_3_Inv_Customer_Lookup.png
Lookup has both Code and Description same
Pizza_3_Inv_Customer_Lookup.png (13.13 KiB) Viewed 186 times
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial missing in video

Postby admin » Tue Dec 15, 2020 7:17 pm

Hi,

Give this a go:

Code: Select all
nuHide('inv_customer_iddescription');


Could you log an issue on Github (as improvement)? Thanks a lot!
admin
Site Admin
 
Posts: 3404
Joined: Mon Jun 15, 2009 9:53 am

Re: Pizza Tutorial missing in video

Postby apmuthu » Tue Dec 15, 2020 10:33 pm

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?
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial missing in video

Postby apmuthu » Wed Dec 16, 2020 12:05 am

@kev1n: Thanks.
The custom code did it.
Code: Select all
if (nuFormType() == 'edit') {
    nuHide('inv_customer_iddescription');
}
Attachments
Invoice Customer Lookup Custom JS.png
Pizza 3 Tutorial Customer Lookup js code
Invoice Customer Lookup Custom JS.png (19 KiB) Viewed 174 times
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial missing in video

Postby steven » Fri Dec 18, 2020 10:45 am

apmuthu,

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


Steven
steven
 
Posts: 107
Joined: Mon Jun 15, 2009 5:33 pm

Re: Pizza Tutorial missing in video

Postby apmuthu » Fri Dec 18, 2020 4:14 pm

@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
Attachments
id descriptor from browser code inspector.png
Finding the id of the field to act upon in js / php
id descriptor from browser code inspector.png (50.57 KiB) Viewed 152 times
apmuthu
 
Posts: 114
Joined: Sun Dec 06, 2020 3:20 pm
Location: Chennai, India, Singapore

Re: Pizza Tutorial missing in video

Postby steven » Sat Dec 19, 2020 3:52 am

apmuthu,

Setting Width to 0 will hide the Description field.

descw.png
descw.png (26.83 KiB) Viewed 147 times



Steven
steven
 
Posts: 107
Joined: Mon Jun 15, 2009 5:33 pm

Next

Return to General