[System : Formula] locImportofXLDataSTB : "Import Box Sales" [#menu : Import Direct] Add : Key item : After : @@locImportofData : @@locImportofXLDataSTB : X : CALL : ImportSTB [Function : ImportSTB] 010 : Call : ImportSVCSTB [Function : ImportSVCSTB] Variable : Counterx1 : Number Variable : ParName1 : String : 0 000 : QUERYBOX : "Import Box Sales Vouchers?":Yes:No 001 : IF : NOT $$LastResult 002 : Continue 003 : END IF 00 : SET : Counterx1 : 0 11 : START PROGRESS : ($$NumItems:MSOdbcExcelLedColl) : "Importing Vouchers" : @@CmpMailName : "Importing Sales Vouchers ..." 02 : WALK COLLECTION : MSOdbcExcelLedColl ;;------------------------------------------------- ;;Create Party Ledger under Sundry Debtors if party ledger name not found 40 : Set : ParName : $DSDCName1 41 : IF :$$IsEmpty:$Name:Ledger:##parName1 42 : NEW OBJECT : Ledger 43 : Set Value : Name : ##ParName1 44 : Set Value : Parent : "Sundry Debtors" 45 : CREATE TARGET 46 : END IF ;;------------------------------------------------- ;;Basic Info 49 : SET : SVViewName : $$SysName:AcctgVchView 50 : NEW OBJECT : Voucher 51 : SET VALUE : Date : $$Date@EVchDatePost1 52 : SET VALUE : VoucherTypeName : "Sales" 53 : SET VALUE : Narration : $DSDNarr1 57 : SET VALUE : VoucherNumber : $$RoundUp:$DSDVchNo1 58 : SET VALUE : Reference : $$RoundUp:$DSDVchNo1 ;;--------------------------------------------------------- ;;BY Entry 60 : INSERT COLLECTION OBJECT : LedgerEntries 61 : SET TARGET : LedgerEntries 62 : SET VALUE : LedgerName : $DSDCName1 63 : SET VALUE : AMount : $DSDAmount 64 : SET VALUE : Is Deemed Positive : "Yes" 65 : SET TARGET : .. ;;--------------------------------------------------------- ;;TO SALES Entry 66 : IF : NOT :$$IsEmpty:$DSDVchAmt1 70 : INSERT COLLECTION OBJECT : LedgerEntries 71 : SET TARGET : LedgerEntries 72 : SET VALUE : LedgerName : "Dish TV Sd-Box ( Sales)" 73 : SET VALUE : Amount : $DSDVchAmt1 ; 73A : Set Value : TaxClassificationName : $TaxClassificationName:Ledger:$$String:"Sales @ 0%" ; 73B : Set Value : VATAssessableValue : $$AsAmount$DSDVchAmt0)*(-1) 74 : SET VALUE : Is Deemed Positive : "No" 76 : SET TARGET : .. 77 : END IF ;;--------------------------------------------------------- ;;MMT ENTRY 79 : IF : NOT :$$IsEmpty:$DSDMMT 80 : INSERT COLLECTION OBJECT : LedgerEntries 81 : SET TARGET : LedgerEntries 82 : SET VALUE : LedgerName : "MMT Commision / Scheme" ; 82A : Set Value : TaxClassificationName : $TaxClassificationName:Ledger:$$String:"Output VAT @ 14%" ; 82B : Set Value : VATAssessableValue : $$AsAmount:$DSDVATAmt0 84 : SET VALUE : Amount : $DSDMMT 85 : SET VALUE : Is Deemed Positive : "YES" 86 : SET TARGET : .. 87 : END IF ;;--------------------------------------------------------- ;;TO Fitting Charges Entry 99 : IF : NOT :$$IsEmpty:$DSDFeeting 100 : INSERT COLLECTION OBJECT : LedgerEntries 101 : SET TARGET : LedgerEntries 102 : SET VALUE : LedgerName : "Feeting Charges" ; 103 : SET VALUE : Amount : $DSDVchAmt5 ; 103A : Set Value : TaxClassificationName : $TaxClassificationName:Ledger:$$String:"Sales @ 5%" ; 103B : Set Value : VATAssessableValue : $$AsAmount$DSDTotal5)*(-1) 104 : SET VALUE : Amount : $DSDFeeting 105 : SET VALUE : Is Deemed Positive : "YES" 106 : SET TARGET : .. 107 : End If ;;--------------------------------------------------------- ; ;;TO ZH Budget Enty ; 109 : IF : NOT :$$IsEmpty:$DSDZhBudget 110 : INSERT COLLECTION OBJECT : LedgerEntries 111 : SET TARGET : LedgerEntries 112 : SET VALUE : LedgerName : "Z H Budget" ; 112A : Set Value : TaxClassificationName : $TaxClassificationName:Ledger:$$String:"Output VAT @ 5%" ; 112B : Set Value : VATAssessableValue : $$AsAmount:$DSDVATAmt5 113 : SET VALUE : Amount : $DSDZhBudget 114 : SET VALUE : Is Deemed Positive : "YES" 115 : SET TARGET : .. 116 : END IF ; ; ;;--------------------------------------------------------- ; ;;TO Activation Debit Entry ; 199 : IF : NOT :$$IsEmpty:$DSDActDr 200 : INSERT COLLECTION OBJECT : LedgerEntries 201 : SET TARGET : LedgerEntries 202 : SET VALUE : LedgerName : "Activation Debit" ; 202A : Set Value : TaxClassificationName : $TaxClassificationName:Ledger:$$String:"Sales Exempted" ; 202B : Set Value : VATAssessableValue : $$AsAmount$DSDVchAmt0)*(-1) 203 : SET VALUE : Amount : $DSDActDr 204 : SET VALUE : Is Deemed Positive : "No" 205 : SET TARGET : .. 206 : END IF ; ;;By Activation Debit Entry ; 211 : IF : NOT :$$IsEmpty:$DSDActCr 212 : INSERT COLLECTION OBJECT : LedgerEntries 213 : SET TARGET : LedgerEntries 214 : SET VALUE : LedgerName : "Activation Credit" ; 202A : Set Value : TaxClassificationName : $TaxClassificationName:Ledger:$$String:"Sales Exempted" ; 202B : Set Value : VATAssessableValue : $$AsAmount$DSDVchAmt0)*(-1) 215 : SET VALUE : Amount : $DSDActCr 216 : SET VALUE : Is Deemed Positive : "YES" 217 : SET TARGET : .. 218 : END IF ;;--------------------------------------------------------- 900 : CREATE TARGET ;;--------------------------------------------------------- 910 : SET VALUE : PersistedView : ##SVViewname 930 : INCREMENT : Counterx1 940 : SHOW PROGRESS : ##Counterx1 950 : END WALK 960 : END PROGRESS 970 : RETURN [Collection: ExcelMSODBCColl] ODBC : "Driver={Microsoft Excel Driver (*.xls)};Dbq=" + @@MaterODBCExcelPath1 +"" SQL : "SELECT * FROM ["+@@MaterODBCExcelSheet1+"$]" SQLObject : ExcelMSODBCObject [Object : ExcelMSODBCObject] DSDDatex1 : $_1 ; Inv Date DSDVchNo1 : $_2 ; Inv No DSDCName1 : $_3 ; Party Name DSDVchAmt1 : $_4 ; Sales Ledger DSDMMT : $_5 ; MMT DSDFeeting : $_6 ; Feeting DSDZhBudget : $_7 ; ZH Budget DSDActDr : $_8 ; Activation Dr DSDAmount : $_9 ; Party Ledger Debit amount DSDNarr : $_10 ; Narration DSDActCr : $_11 ; Activation Cr [Collection : MSOdbcExcelLedColl] Source Collection : ExcelMSODBCColl Compute : DSDDatex1 : $DSDDatex1 Compute : DSDVchNo1 : $DSDVchNo1 Compute : DSDCName1 : $DSDCName1 Compute : DSDVchAmt1 : $DSDVchAmt1 Compute : DSDMMT : $DSDMMT Compute : DSDFeeting : $DSDFeeting Compute : DSDZhBudget : $DSDZhBudget Compute : DSDActDr : $DSDActDr Compute : DSDAmount : $DSDAmount Compute : DSDNarr : $DSDNarr Compute : DSDActCr : $DSDActCr [System : Formula] EVchNoPost1 : $_1 EVchDatePost1 : $$Date@EVchDateStrPost1 EVchDateStrPost1: ($$StringPart:$_1:8:2) + "-" + + ($$StringPart:$_1:5:2) + "-" + + ($$StringPart:$_1:0:4) [System : Formula] Mater ODBC Excel Path1 : "D:\AnandSales.xls" ;; The Excel Sheet Path Mater ODBC Excel Sheet1 : "SalesVCHSTB" ;; Sheet name in That Excel File ;;End-of-File