826

(8 replies, posted in General)

I was trying to put together a menu using Mathias template but couldn't get it working.


Any help please...


Please see the attached sample project:

827

(1 replies, posted in General)

Hi Guys,


I'm trying to create invoice items dispatch list and report so that user can track after invoice issued if invoice items sent to customers or not.
1. All invoice items would be listed on Dispatch tab / tgOrderItems if "Dispatched" checkbox in SaleInv form is not checked. I thought this part would be easy using dispatched checkbox filter on SaleInv form but couldn't get them listed.


2. What would be easiest way to move all or selected items from "tgOrderItems" to "tgDispReport"


3. Is it possible to save dispatch report so that I can display all dispatch reports and it's details on a separate search tab.


Perhaps my approach is wrong or not practical. Any advice and help appreciated.


Merry Christmas to all.................


Pleas see the attached sample project:

828

(3 replies, posted in General)

Thanks a lot Guys..........

Hi Guys,


How can I create an unique auto incrementing field with text before (prefix) option?
Something similar to tGrid auto increment.
I like to use for numbering invoices, products, customers etc., such as INV 123 or INV-123 rather than just 123 which can be done with record count. Unfortunately, record count doesn't have prefix option or I'm missing it.

830

(9 replies, posted in General)

Thank you very much Dmitry...........


I didn't realize that I had to use both procedure. It works just as I wanted. Thanks again.

831

(9 replies, posted in General)

Hi Guys,


Thanks a lot.......


Again unless I'm doing something wrong replacing tGrid record double click to show record still didn't work.

832

(9 replies, posted in General)

Hi JB,


Thanks for the suggestion...


Unless, I did something wrong it still launches both forms on double click.

833

(9 replies, posted in General)

Derek,


Thank you so much.....  Extra tonnes of thanks for the quick reply........


That does the job of disabling double click fine.


Now let see if Dmitry offers double click acting as edit record (showRecord) only.

834

(9 replies, posted in General)

Hi Derek,


Thanks a lot for the example... Appreciated...


I posted the below on a separate topic but if you are around could you please answer:

procedure Form1_tgSearchSaleInv_OnCellDoubleClick (Sender: string; ACol, ARow: Integer);
begin
     //Script for replacing double click action on a tGrid record with show records button action please....

end;

If the above is not doable then disabling tGrid CellDoubleClick or DoubleClick (whichever is the correct one) could do the job.
Therefore in this situation I'd be just using Edit button for editing selected inv.



I used two form for adding inv and Redund and two edit buttons on same form1/Sale Inv / tGrid. Buttons work OK but double click on a record on tGrid launches both forms.

835

(9 replies, posted in General)

procedure Form1_tgSearchSaleInv_OnCellDoubleClick (Sender: string; ACol, ARow: Integer);
begin
     //Script for replacing double click action on a tGrid record with show records button action please....

end;

If the above is not doable then disabling tGrid CellDoubleClick or DoubleClick (whichever is the correct one) could do the job.


I like to use this solution on sample project "CR and DB - Refunds 3.zip" post-8, posted here:
http://myvisualdatabase.com/forum/viewtopic.php?id=2945

836

(9 replies, posted in General)

Hi ehwagner and Derek.


Thank you very much for your suggestions guys......


In line of ehwagner's simple approach suggestion, I altered the project and put together something. I used boolean checkboxes as a filter. I don't know if it's done correctly though.


However, I have one issue with it.
On Form1 / Invoices tab / Refund Selected Invoice button (button14)  used as show records action to get selected invoice details on "frmCR_SaleRefund" form.
It does the job but it causes to load both "frmSaleInv" and "frmCR_SaleRefund" at same time when double clicked  on a record on Form1 / Invoices tab /  "Refund Selected Invoice" (button14)
I'm thinking putting double click event for "tgSearchSaleInv" or onclick event for the button "Refund Selected Invoice" (button14) needed and I couldn't do either of them.


Derek, I look forward to your version implementation.


Please see updated sample project.

837

(9 replies, posted in General)

I understand Dmitry... Thank you for the reply.


It'd be nice to hear from other guys who has some experience/thoughts about implementing invoice refunds. Perhaps, there is a simpler/easier approach.


Derek, If you are around I'd love to hear your ingenious suggestions...

838

(31 replies, posted in General)

Dmitry,


Error occurs during tGrid cells data add/edit then save (Clicking on next row once finished adding values) when #(Auto Increment) used on tGrid settings.


Followings are my shortcomings, I don't think they are related to app bug. That was the reason I asked for example projects. Anyhow, I have created one with errors that I cannot resolve.


1. When adding/Editing data to a tGrid via another form and tGrid I get multiple records displayed on secondary table. (Form1 Invoices and Customers / Forms Inv and Customer)


2. I couldn't get linked all (comboboxes) work. Please see Inv form


3. I have no idea how to calculate on Inv form the followings:
net price= (qty * unit price)
tax amount = (net price * tax rate / 100)
item total= (net price +Tax amount)
I like to put calculation scripts on script page not within fields on db tables as calc fields.


4. Db Image field didn't work in tGrid cell. Perhaps it's not supported yet.


5. It'd be nice to have Add / Edit buttons for tGrid on same form as it wont't be clear for many users clicking on tGrid cells at first. Clicking on Add would put cursor on first available cell. Clicking on edit button would place cursor on on first editable cell of selected record on tGrid.

839

(31 replies, posted in General)

Hi Dmitry,


Thank you for the MVD 3.1...


Is there sample projects showing editable tGrid in action?
I have tried simple 1 table 3 fields project but got errors.


It'd be very helpful if you could make couple of sample project utilizing on editable tGrid:
1. Simple project without a script
2. Not so simple project, most likely with script showing usage of comboboxes, boolean, images, url and other links etc (whatever editable tGrid can support) in tGrid cells.

840

(9 replies, posted in General)

Hi Dmitry,


I'm trying to do:

1. Select an invoice on Form1 / Sale Invoices tab and click on "Refund Selected Invoice" button to display selected invoice details on "frmCR_SaleRefund"


2. If required edit (partial refund ) and save the data displayed on "frmCR_SaleRefund" to "crSaleInvRefund" / "crSaleInvRefundItems"


3. Change the color or add some indication to the original invoice on Form1 / Sale Invoices tab on save of the refunds so  that  invoice has a refund indication.


I have commented out script lines produced errors and I couldn't correct..


Please see the updated sample project.

841

(4 replies, posted in General)

AD1408 wrote:

Thanks a lot guys........


I'm trying to copy one field value to another.


I like to copy Deliv Cost field value (on form calc) into Plus Deliv Cost field to include in calc as seen on the image above.

I have tried

procedure CalculateTotal;
frmTest.edTestDelivCostPlus.Value := frmTest.edTestDelivCost.Value;

The above script crashes the app on compile?


I think I've sorted it out. It wasn't the script above casing the issue but it was event procedure associated:


procedure frmTest_edTestDelivCostPlus_OnChange (Sender: string);
begin
    CalculateTotal;
end;

After commenting out the event procedure it worked OK. I was kind of asking calc total of nothing it seems.

842

(4 replies, posted in General)

Thanks a lot guys........


I'm trying to copy one field value to another.


https://s29.postimg.org/v5oz8iunb/copydelivcost.png


I like to copy Deliv Cost field value (on form calc) into Plus Deliv Cost field to include in calc as seen on the image above.

I have tried

procedure CalculateTotal;
frmTest.edTestDelivCostPlus.Value := frmTest.edTestDelivCost.Value;

The above script crashes the app on compile?


ps/. I know there is an issue on tax calc as items tax rates can be different. I think I'll have to calc discount separately and copy similar to deliv cost. However, suggestions are welcome.

843

(4 replies, posted in General)

I just cannot workout what the heck is wrong with the script below?


procedure CalculateTotal;

begin
    frmTest.edNetTotal.Value := (frmTest.edSubTotal.value + frmTest.edDelivery.Value) - (frmTest.edDiscount.Value); //NetTotal calcs ok

    frmTest.edGrossTotal.Value := frmTest.edNetTotal.Value + frmTest.edTaxTotal.Value;  // GrossTotal cals is not working
end;


 procedure frmTest_edDiscount_OnChange (Sender: string);
begin
    CalculateTotal;
end;

procedure frmTest_edDelivery_OnChange (Sender: string);
begin
    CalculateTotal;
end;


begin

end.

844

(9 replies, posted in General)

Hi Guys,


Please, I need a help and advise on how to implement sale refunds (Credit Note) as I tried without any success.


Please see the attached sample file:

845

(3 replies, posted in General)

Hi Derek,


Thanks a lot for the reply.


Main issue seems to be missing link (as you have kindly pointed out) from expense item to expenses table with ^(cascade delete checked)


Here is the working version as far as I can see:

846

(3 replies, posted in General)

Hi Guys,


I couldn't find the reason why clicking on "Add" button (New record) on Form1 / Expenses Tab acting as Edit for latest added record instead of loading empty frmExpenses?


Please see the attached sample project:

847

(8 replies, posted in General)

Hi Dmitry,


Thank you very much......

848

(2 replies, posted in General)

Hi pozidis,


Most likely you know about button properties: enable (True/False) and visible (True/False)


If you are after conditional enable/disable then check out Derek's solution and see if it provides any answer for you:
http://myvisualdatabase.com/forum/viewtopic.php?id=2931

849

(8 replies, posted in General)

Hi Guys,


Objective is to move some tGrid footer values to currency fields so that I can try to do new calculations.


Please see the attached sample project:

850

(4 replies, posted in General)

Hi Derek,


It seems I've failed to give proper attention to your last para on your previous post. My bad.
Thank you very much for your latest post.