@@ -5,13 +5,19 @@ slug: /usage/customisation/sqlControlCenter
55tags : ["SQL Account"]
66---
77
8+ ::: warning
9+
10+ Any DIY Scripts in this page should be used in SQL Accounting x86 (32bit) instead of x64 (64bit) version
11+
12+ :::
13+
814## Shipping/Forwarding (S/F)
915
10- This Customisation provides simple calculations for shipping/forwarding companies .
16+ This Customisation is the simple calculation for the Shipping/Forwarding company .
1117
1218[ Sample Database] ( https://download.sql.com.my/customer/Fairy/ACC%20BK-%5bShipping%5d.zip )
1319
14- [ YouTube video ] ( https://www.youtube.com/watch?v=LPoz1h3hyvQ )
20+ [ Video ] ( https://www.youtube.com/watch?v=LPoz1h3hyvQ )
1521
1622### History New/Updates/Changes (S/F)
1723
@@ -20,42 +26,42 @@ This Customisation provides simple calculations for shipping/forwarding companie
2026* Use Maintain Currency for Currency Symbol & Currency Rate for detail UDF
212705 Feb 2016
2228
23- * Fixed TaxInvoice-Fowarding2 batch print: tax summary mixed together.
24- * Fixed Quotation & Debit Note OnBeforeSave script sequence not correct.
29+ * Fixed TaxInvoice-Fowarding2 batch print Tax summary mixing together
30+ * Fixed Quotation & Debit Note OnBeforeSave Script Seq not correct.
253104 Jan 2016
2632
27- * Fixed TaxInvoice-Fowarding2 title missing the word "Tax".
33+ * Fixed TaxInvoice-Fowarding2 Title missing Tax word
2834
293507 Dec 2015
3036
31- Fixed Sales Local - Invoice Listing - Level 1: Ent column showed empty values when 0.
37+ Fixed Sales Local - Invoice Listing - Level 1 Ent column some shown empty when 0.
323802 Nov 2015
3339
34- * Fixed sequence error.
35- * Fixed TaxInvoice-Fowarding2 format: showed 'A' instead of the tax rate.
40+ * Fix Seq Error
41+ * Fix TaxInvoice-Fowarding2 format show A instead Tax Rate
3642
374320 Oct 2015
3844
39- * Fixed Transfer document TaxAmt calculation when using UDF_ExRate \< > 1.
40- * Fixed partial transfer quantity TaxAmt calculation.
45+ * Fix Transfer Document TaxAmt calculate incorrectly if using UDF_ExRate \< > 1
46+ * Fix Partial Transfer Qty TaxAmt calculate incorrectly
4147
424819 Oct 2015
4349
44- * Fixed upgrade to Version 721 error.
45- * Fixed Transfer document TaxAmt calculation.
50+ * Fix upgrade to Version 721 error.
51+ * Fix Transfer Document TaxAmt calculate incorrectly
4652
475314 Oct 2015
4854
49- * Fixed 0Sales Local - Invoice Listing - Level 1: margin not correct.
50- * Converted DocRef3 to UDF_EntCost for 0Sales Local - Invoice Listing - Level 1 Ent column.
55+ * Fix 0Sales Local - Invoice Listing - Level 1 margin not correct
56+ * Convert DocRef3 to UDF_EntCost for 0Sales Local - Invoice Listing - Level 1 Ent column
5157
5258### Settings (S/F)
5359
5460#### Maintain User (S/F)
5561
5662* Menu: Tools | Maintain User...*
5763
58- Untick the " Access Right for Prompt Replace Unit Price Dialog" under the Group: Sales.
64+ Untick the Access Right for Prompt Replace Unit Price Dialog under the Group : Sales
5965
6066### Steps (S/F)
6167
@@ -81,12 +87,12 @@ Untick the "Access Right for Prompt Replace Unit Price Dialog" under the Group:
8187
8288![ printProfit&LossByDoc] ( ../../../static/img/miscellaneous/sqlControlCenter/printProfit&LossByDoc.png )
8389
84- 1 . Select Invoice Listing and date range.
85- 2 . Tick ' Group by Customer Code'.
86- 3 . Click Apply.
87- 4 . Press F6 to preview.
88- 5 . Select the report named ' 0Sales Local - Invoice Listing - Level 1'.
89- 6 . Click OK.
90+ 1 . Select Invoice Listing & Range Date
91+ 2 . Tick Group by Customer Code
92+ 3 . Click Apply
93+ 4 . Press F6 to preview
94+ 5 . Select report name 0Sales Local - Invoice Listing - Level 1
95+ 6 . Click Ok button
9096
9197## Bonus Point System (BPS)
9298
@@ -114,17 +120,17 @@ This Customisation is to calculate/maintain the Point/Bonus
114120
11512125 Dec 2015
116122
117- * Enabled GST support.
118- * Added UnClaim Voucher Listing report.
119- * Added Bonus-Sales Invoice 7 (GST 2) report.
120- * Fixed Bonus Statement currency symbol issue.
121- * Removed auto 5-cent rounding script.
123+ * Enable Support GST Version
124+ * Add UnClaim Voucher Listing report
125+ * Add Bonus-Sales Invoice 7 (GST 2) report
126+ * Fix Bonus Statement show $ symbol
127+ * Remove auto 5 cents rounding script
122128
123- ### Modules required (BPS)
129+ ### Modules Required (BPS)
124130
125131* DIY Field
126132* DIY Script
127- * Invoice → DO
133+ * Invoice ----> DO
128134* Multiple Document Number Set
129135
130136### Settings (BPS)
@@ -133,15 +139,15 @@ This Customisation is to calculate/maintain the Point/Bonus
133139
134140* Menu: Tools | Maintain User...*
135141
136- Untick the " Access Right for Prompt Replace Unit Price Dialog" under the Group: Sales.
142+ Untick the Access Right for Prompt Replace Unit Price Dialog under the Group : Sales
137143
138144#### Maintain Item
139145
140146* Menu: Stock | Maintain Stock Item...*
141147
142148![ stockItemClaimRate] ( ../../../static/img/miscellaneous/sqlControlCenter/stockItemClaimRate.jpg )
143149
144- 1 . Create an item code for the voucher (example: Voucher — used for claims, e.g. 1 point = RM0 .01).
150+ 1 . Item Code to be create - Voucher => For Claim use (eg 1 point = RM 0 .01)
145151
146152 ![ stockItemVoucherRate] ( ../../../static/img/miscellaneous/sqlControlCenter/stockItemVoucherRate.jpg )
147153
@@ -156,7 +162,7 @@ Untick the "Access Right for Prompt Replace Unit Price Dialog" under the Group:
156162| ** UDF Field** | ** Description** |
157163| ---------------------| ---------------------------------------------------------------------------------|
158164| ** UDF_VoucherNo** | Enter the Voucher Number (Extra DO DocNo). Amount will be based on the Extra DO DocAmt. Not applicable for Sales Credit Note. |
159- | ** UDF_VoucherRate** | From Maintain Item. The user can still adjust the rate if needed. |
165+ | ** UDF_VoucherRate** | From maintain item. User can still adjust the rate if needed. |
160166| ** UDF_UseQty** | ** Tick** → ` UDF_Voucher = UDF_VoucherRate * Qty ` . ** UnTick** → ` UDF_Voucher = UDF_VoucherRate * Amount ` . |
161167| ** UDF_Voucher** | ` Total current item point ` . |
162168
@@ -180,7 +186,7 @@ Untick the "Access Right for Prompt Replace Unit Price Dialog" under the Group:
180186
181187*** Sales Invoice***
182188
183- Below is an example of Sales Invoice with voucher claim.
189+ Below is example in Sales Invoice with Voucher Claim
184190* Menu: Sales | Invoice...*
185191
186192![ utdPoint] ( ../../../static/img/miscellaneous/sqlControlCenter/utdPoint.jpg )
@@ -403,7 +409,7 @@ Tick the Lock Project option. Tick IsSearchProjectCode to allow searching by pro
403409
404410![ lockProject] ( ../../../static/img/miscellaneous/sqlControlCenter/lockProject.jpg )
405411
406- ## Assignment : To Create the Unit Price Calculation
412+ ## Assignment 1 : To Create the Unit Price Calculation
407413
408414* Create the DIY field such as UDF_mUnitPrice in Sales documents (eg. sales invoice)
409415* Purpose: User will key-in the base unit price to convert into new unit price based on the UOM rate in Maintain Stock Item.
@@ -488,7 +494,7 @@ Avoid update the same existing field name Unit Price. You have to create differe
488494
489495![ input-values-for-udf] ( ../../../static/img/miscellaneous/sqlControlCenter/input-values-for-udf.png )
490496
491- ## Assignment : How to get the data from Master Table into entry form?
497+ ## Assignment 2 : How to get the data from Master Table into entry form?
492498
493499* Create the DIY fields such as UDF_PCS, UDF_CTN in Maintain Stock Item; and
494500* UDF_Price in Sales Documents (eg. sales invoice).
@@ -590,6 +596,7 @@ Avoid update the same existing field name Unit Price. You have to create differe
590596 ```bash
591597 var FComServer, lBizObj : Variant;
592598 cdsData : TClientDataSet;
599+ D : TDataSource;
593600
594601 function ComServer: Variant;
595602 begin
@@ -605,7 +612,7 @@ Avoid update the same existing field name Unit Price. You have to create differe
605612 FComServer := null;
606613 cdsData := TClientDataSet.Create(nil); // Create & preparing Component
607614 try
608- lCode := Dataset.FindField('ItemCode').AsString;
615+ lCode := D. Dataset.FindField('ItemCode').AsString;
609616 lSQL := Format('SELECT UDF_PCS, UDF_CTN FROM ST_ITEM WHERE Code=%s',[QuotedStr(lCode)]);
610617
611618 cdsData.Data := ComServer.DBManager.Execute(lSQL);
@@ -616,30 +623,34 @@ Avoid update the same existing field name Unit Price. You have to create differe
616623 end;
617624
618625 begin
626+ D := TDataSource(Self.FindComponent('dsDocDetail'));
627+
619628 if SameText(EditingField, 'ItemCode') or
620629 SameText(EditingField, 'UOM') or
621630 SameText(EditingField, 'UDF_Rate') then begin
622631 try
623632 GetStockInfo;
624- if Dataset.FindField('UOM').AsString = 'PCS' then
625- Dataset.FindField('UDF_Price').AsFloat := cdsData.FindField('UDF_PCS').AsFloat else
626- if Dataset.FindField('UOM').AsString = 'CTN' then
627- Dataset.FindField('UDF_Price').AsFloat := cdsData.FindField('UDF_CTN').AsFloat else
628- Dataset.FindField('UDF_Price').AsFloat := 1;
629-
630- Dataset.FindField('UnitPrice').AsFloat := Dataset.FindField('UDF_Price').AsFloat *
631- Dataset.FindField('UDF_Rate').AsFloat;
633+ if D. Dataset.FindField('UOM').AsString = 'PCS' then
634+ D. Dataset.FindField('UDF_Price').AsFloat := cdsData.FindField('UDF_PCS').AsFloat else
635+ if D. Dataset.FindField('UOM').AsString = 'CTN' then
636+ D. Dataset.FindField('UDF_Price').AsFloat := cdsData.FindField('UDF_CTN').AsFloat else
637+ D. Dataset.FindField('UDF_Price').AsFloat := 1;
638+
639+ Dataset.FindField('UnitPrice').AsFloat := D. Dataset.FindField('UDF_Price').AsFloat *
640+ D. Dataset.FindField('UDF_Rate').AsFloat;
632641 finally
633642 cdsData.Free;
634643 end;
635644 end;
636645 end.
637- ```
646+ ```
638647
63964810 . Click Save button.
640649
641650 ::: warning
642651 Avoid update the same existing field name Unit Price and "Rate". You have to create different name ie. UDF_Price and UDF_Rate.
652+
653+ Remember to Register the "Automation Server Registration" in Tools -> Options -> General -> Register.
643654 :::
644655
645656### Result Test (Master Data)
@@ -667,7 +678,7 @@ Avoid update the same existing field name Unit Price. You have to create differe
667678
668679 ![ valuesfor-udfprice-udfrate] ( ../../../static/img/miscellaneous/sqlControlCenter/valuesfor-udfprice-udfrate.png )
669680
670- ## Assignment : How to get Outstanding IV amount & show below the Browse button at Sales Invoice?
681+ ## Assignment 3 : How to get Outstanding IV amount & show below the Browse button at Sales Invoice?
671682
672683* This assignment no need to create any DIY fields
673684* Purpose is to display the total outstanding balance for the customer selected at the Invoice
@@ -762,7 +773,7 @@ Avoid update the same existing field name Unit Price. You have to create differe
762773 Parent := TWinControl(C);
763774 Width := 66;
764775 Left := 6;
765- Top := 200 ;
776+ Top := 350 ;
766777 Caption := 'Outstanding';
767778 Font.Color := clBlue;
768779 Font.Style := [fsBold];
@@ -771,7 +782,7 @@ Avoid update the same existing field name Unit Price. You have to create differe
771782 Parent := TWinControl(C);
772783 Width := 66;
773784 Left := 6;
774- Top := 215 ;
785+ Top := 365 ;
775786 Caption := 'DocNo';
776787 Font.Color := clBlue;
777788 Font.Style := [fsBold];
0 commit comments