Re: Need Help

unforgettable wrote:

Thank you again brain. How did you populate table? You did not make any change on income statement. I still could not understand about a and b.

I didn't make any changes on income statement.
The populating of data occur on the onClick method of No_Sales_2 Button.
It's like Insert into qtable with the (Select query I copied on No_Sales Query)

qtable columns is the same count and sequence on its corresponding data in the select query for it to execute properly.

brian

Re: Need Help

hai brian.zaballa  don't forget change your fiter datetimpicker2  to < =

Post's attachments

Attachment icon filter.PNG 62.97 kb, 123 downloads since 2020-10-15 

Re: Need Help

agusecc wrote:

hai brian.zaballa  don't forget change your fiter datetimpicker2  to < =

Thank you for pointing that out. I have overlooked it after copy-paste. LoL

brian

Re: Need Help

Hi brain
          How are you? Plz make changes for income statement and print too. One error message display when I enter same codes in another project. What does mean and its sosolution? See attached file.

Post's attachments

Attachment icon tmp-cam-528169527.jpg 181.47 kb, 120 downloads since 2020-10-16 

Re: Need Help

unforgettable wrote:

Hi brain
          How are you? Plz make changes for income statement and print too. One error message display when I enter same codes in another project. What does mean and its sosolution? See attached file.

Please make a detailed explanation to what you want to print for us to see what we can do to help. Count, Sum on a table etc. It is easier that way.
If you can also attach the mvd project with that error, someone might see what's wrong with your query/code.

brian

Re: Need Help

Hi brain
           Thank to reply. Infact I did not define the column so I got the error message. Plz go to income statement of sales expenses project and tell me how do I enter discount and get print.

Re: Need Help

Upon checking, It is not possible due to the query made in Income Statement is grouped by Category and is selected in sales table.
Your discount is in the Sales_Ticket table. My suggestion is that you move the discount to sales table for it to be accessed in your current Income Statement Report.

brian

Re: Need Help

Hi brain
          Thank you to reply. If I move discount to sales table then how it will affect income statement?  In income statement how to add other field to print?

34 (edited by brian.zaballa 2020-10-19 03:20:16)

Re: Need Help

Here. I just cant hide some details of expense from report. I'm not that good at it. Hope someone has the idea to do it.

By the way, I again didn't update the date filter on No of Sales report agusecc pointed. Just update that one.

Post's attachments

Attachment icon Income_Expenses_New_4.zip 518.4 kb, 275 downloads since 2020-10-19 

brian

Re: Need Help

Thank you brain you have given a good idea. Let me to go ahead. In this project look at form2 we mus add and other combobox and combobox1 must be its parent. As we select items from combobox 2 its price automatically show on edit2. how it will possible?

36 (edited by brian.zaballa 2020-10-20 22:11:16)

Re: Need Help

unforgettable wrote:

Thank you brain you have given a good idea. Let me to go ahead. In this project look at form2 we mus add and other combobox and combobox1 must be its parent. As we select items from combobox 2 its price automatically show on edit2. how it will possible?

Just add another table (e.g. items) with relationship to Category, then have a relationship on sales table pointing to the new table

Post's attachments

Attachment icon Income_Expenses_New_5.zip 519.75 kb, 270 downloads since 2020-10-21 

brian

Re: Need Help

Thank you brain. I would like to know why did you add Edit1? For which purpose? Second we can add third combobox? which contain code of items? Third how can we add and edit component to use bar code reader?

38 (edited by brian.zaballa 2020-10-21 12:31:50)

Re: Need Help

unforgettable wrote:

Thank you brain. I would like to know why did you add Edit1? For which purpose? Second we can add third combobox? which contain code of items? Third how can we add and edit component to use bar code reader?

I didn't add that Edit1, It is already there but you wont be needing it for It'll be redundant to have the item name in sales item for it is already on item table.
As for the barcode., you don't need another combobox, just add a field on the item table to save the barcode.
You only need to understand how barcode reader works. It simply read the barcode by scanning, then typing it with Enter Key after it typed the code it have read. With these, you can focus on a textbox, then catch that Enter Key with the OnKeyUp method of the textbox, then you can perform a search query from item table.

brian

Re: Need Help

Thank you brain. What is OnKeyUp method? how it can be done? can we add parent of parent combobox?

Re: Need Help

Its in the Event tab on the left side. You don't need another combobox for the barcode, you can have another field in items table. An int or string can handle barcode.

Post's attachments

Attachment icon 2020-10-22_034907.png 55.89 kb, 110 downloads since 2020-10-21 

brian

Re: Need Help

Thank you brain. Can you send keys number as you mentioned in pic?

Re: Need Help

unforgettable wrote:

Thank you brain. Can you send keys number as you mentioned in pic?

It's the key from keyboard, 13 stands for Enter key. Here's a sample for a barcode reader function. Hope you got the idea.

Post's attachments

Attachment icon unforgettable_barcode.zip 493.92 kb, 322 downloads since 2020-10-23 

brian

43 (edited by unforgettable 2020-10-23 19:49:07)

Re: Need Help

Thank you brain. To unzip it needs password? It is giving an error message "XML document must have top level element. Line:0".
My second issue is how to use and in if then statement for two condition must be true.

44 (edited by brian.zaballa 2020-10-24 02:48:21)

Re: Need Help

unforgettable wrote:

Thank you brain. To unzip it needs password? It is giving an error message "XML document must have top level element. Line:0".
My second issue is how to use and in if then statement for two condition must be true.

Attached zip don't have password. I just zip it using the zip function of windows.
as for the AND, easiest way is to enclosed them in parenthesis.

if ((CONDITION1) AND (CONDITION2)) then begin
    // your code here...
end else begin
    // when failed
end;
brian

Re: Need Help

Thanks brain. Look at attached project I add  a check box on form2. I typed code for event Form2_CheckBox1_OnClick (Sender: TObject); It works very well. How can I type code for event Form2_ComboBox2_OnChange (Sender: TObject); and how it will affect on No_Sales2 form?

Post's attachments

Attachment icon Income_Expenses_New_6.zip 349.18 kb, 260 downloads since 2020-10-24 

Re: Need Help

unforgettable wrote:

Thanks brain. Look at attached project I add  a check box on form2. I typed code for event Form2_CheckBox1_OnClick (Sender: TObject); It works very well. How can I type code for event Form2_ComboBox2_OnChange (Sender: TObject); and how it will affect on No_Sales2 form?

Sorry, I'm not so sure on what you want to do with the checkbox. Be specific on citing the function/behavior/process you are aiming for and someone might know and help you with it.

brian

Re: Need Help

Sorry brain you don't understand what I want. In fact I want to know how to use checkbox using one event. in Attached project I added checkbox on form2 to show flat price 10. Sometime store keepers offer flat price on specific items. So how this project manage flat price. I think you will understand what I want to know.

Re: Need Help

unforgettable wrote:

Sorry brain you don't understand what I want. In fact I want to know how to use checkbox using one event. in Attached project I added checkbox on form2 to show flat price 10. Sometime store keepers offer flat price on specific items. So how this project manage flat price. I think you will understand what I want to know.

You can add flat_rate field on items, then you can just get it under the Combobox OnChange Event when checkbox is Checked.

Post's attachments

Attachment icon Income_Expenses_New_7.zip 520.35 kb, 277 downloads since 2020-10-28 

brian

Re: Need Help

Thank you brian. That is thing which I want to know.

Re: Need Help

Hi brain
         How re you? Today I would like to ask some things about combo box in project last you attached. From combobox2 on form2, how can we display its datas on No_Sale_2 form's tablegrid1?