Help me fetch total from optional vouchers

Discussion in 'Tally Developer' started by kosi, Jun 16, 2022.

    
  1. kosi

    kosi Member


    Manage to add totals in optional vouchers report. I want to fetch that total value to my newly created profi and loss report.
    I need optional vouchers total fetch to the purchase field in the profit and loss report. I need the total fetched to the bellow field.

    [Field:purLinAmt]
    Type:Amount
    ;Use:Amount Field
    Set Always:Yes
    ;Background:red
    Space Right:20
    ;Storage:purLinAmtStorage


    PLEASE HELP ME
    Full code is bellow
    [#Menu:Gateway of Tally]

    Add : Item :My Profit and Loss : Display : ParryProAndLDefaultTdl
    [Report:parryProAndLDefaultTdl]
    ;Object:Company;:##SvCurrentCompany
    ;Variable:OptVchRep
    ;Object:Optional Voucher
    ;Variable:BodyBotomLin1Var
    Title:HENSCO TRADING COMPANY LTD.
    Form:parryProAndLDefaultTdl
    Variable : SVFromDate, SVToDate
    Set : SVfromDate : ##SVDate
    Set : SVToDate : ##SVCurrentDate

    [Form:parryProAndLDefaultTdl]
    Button:printButton,ExportButton,ChangePeriod,Refresh TDL,OPPurchasCalRep,otherRepButtons
    Height: 100 % Screen
    Width: 100 % Screen
    ;Part:pnLSale
    ;[Part:pnLSale]
    Part:CostOfSalLin;,AddlCostCompP
    ; Scroll:Vertical
    ;Part:parryProAndLDefaultTdl ;; part1
    ;Scroll:Vertical

    [Part:CostOfSalLin]
    Scroll:Vertical
    Line:DatLin,SaleLn,DirIncomeL,DirIncomeTotFL
    Line:CostOfSalLin,OpStockLin,PurLin,ClosinStocLn,CostOfSalL,DirExpL,CofGoodsAvaiLn,AddlCostCompP,InDirIncomL,IndirectExpL,NetPL
    [Line:DatLin]
    Right Field:DSPMainDateTitle
    ;Right Field:DatLin
    ;Local:Field:DatLin: Set as : "" ;+ $$String:##SVFromDate +"爐o�"+ $$String:##SVToDate
    ;[Field:DatLin]
    ; Use:Date Field
    ;Width : 100% screen
    ;Space Left:50
    ;Style : Large Bold


    [Line:SaleLn]
    Field:SaleLn
    Right Field:SaleLnAmt
    Local:Field:SaleLn: Set as:"SALES ACCOUNTS :"
    Local:Field:SaleLnAmt:Set as:mad:@SalesTotVal;$ClosingBalance:Group:"SALES ACCOUNTS"
    Local: Field: SaleLnAmt : Display :Sales Register

    [Field:SaleLn]
    Border:Thick Bottom
    Style:Large Bold
    [Field:SaleLnAmt]
    Use:Amount Field
    ; Border:Thick Bottom
    Style:Large Bold
    ;Storage:SaleLnAmtStorage
    Set Always:Yes


    [Line:DirIncomeL]
    Field:DirIncomeL
    Right Field:DirIncomeLAmtF
    Local:Field:DirIncomeL:Info:"Direct Incomes"
    Local:Field:DirIncomeLAmtF:Set as:mad:@dirIncomTotVal;"Direct Incomes"
    ;Local: Field: DirIncomeLAmtF : Display:RP GroupSummary:$$IsGroup
    ;Local: Field: DirIncomeLAmtF : Display:RP OpLedgerMonthlySummary:$$IsGroup
    ;Local: Field: DSP DirIncomeLAmtF : Display :Group Summary
    ;Local: Field: DirIncomeLAmtF : Display : RP GroupSummary
    [Field:DirIncomeL]
    [Field:DirIncomeLAmtF]
    Use:Amount Field
    Border:Thick Bottom
    ;Space Right:20

    ;;explode continue

    [Line:DirIncomeTotFL]
    Space Bottom:1
    Right Field:DirIncomeTotFL
    Local:Field:DirIncomeTotFL:Set as:mad:@SalesTotVal + @@dirIncomTotVal;@@SalesTotVal + @@dirIncomTotVal;"fdcc"
    [Field:DirIncomeTotFL]
    Use:Amount Field
    Style:Large Bold
    Set Always:Yes
    ;Storage:SalesPlusDirIncStorage
    [Line:CostOfSalLin]
    Field:CostOfSalLin
    Right Field:CostOfSalLinAmt
    Local:Field:CostOfSalLin:Set as:"Cost Of Sales :"
    Local:Field:CostOfSalLinAmt:Set as:((@@BSOpeningStockNew + ##BodyBotomLin1Var) - (@@BSClosingStockNew)) + (@@DirExpfom);@@BSOpeningStockNew + @@PurchaseTotVal - @@BSClosingStockNew + @@DirExpfom;@VertValue;@OppSign;$ClosingBalance:Ledger"Cost Of Sales :";$MainAmt;@@PLCostOfSales;"Cost Of Sales :"
    [Field:CostOfSalLin]
    Style:Large Bold
    Wide Space:Yes

    [Field:CostOfSalLinAmt]
    Use:Amount Field
    Style:Large Bold
    Set Always:Yes

    [Line:OpStockLin]
    Field:OpStockLin
    Right Field:OpStockLinAmt
    Local:Field:OpStockLin:Set as:"Opening Stock :"
    Local:Field:OpStockLinAmt:Set as:mad:@BSOpeningStockNew;BSOpeningStock;@@GrossProfitTot; if ##SVVariance then @@VarOpValue else @@OpValue;@@VarOpValue;@@OpValue;$PurchaseGrpValue;@VertValue;""
    Local : Field: OpStockLinAmt : Display : Stock Group Summary : NOT $$IsIntegrated
    Local : Field: OpStockLinAmt : Display : Opening Stock Summary : $$IsIntegrated
    [Field:OpStockLin]
    ;Style:Large Bold
    [Field:OpStockLinAmt]
    Space Right:20
    Set Always:Yes


    [Line:purLin]
    Field:purLin
    Right Field:purLinAmt
    Local:Field:purLin:Set as:"Add: Purchase Accounts :"
    ;Local:Field:purLinAmt:Set as:mad:@PurchaseTotVal;@@GrossProfitTot; if ##SVVariance then @@VarOpValue else @@OpValue;@@VarOpValue;@@OpValue;$PurchaseGrpValue;@VertValue;""
    Local:Field:purLinAmt:Set as:mad:@IsOptional;$ClosingBalance:Voucher:##IsOptionalVoucher;$DaybookTotlStorages:OptionalVouchers:$;$IsOptional:Voucher:OptionalVouch;""
    Local : Field: PurLinAmt : Display :Optional Vouchers
    [Field:purLin]
    ;Style:Large Bold
    [Field:purLinAmt]
    Type:Amount
    ;Use:Amount Field
    Set Always:Yes
    ;Background:red
    Space Right:20
    ;Storage:purLinAmtStorage

    [Line:ClosinStocLn]
    Field:ClosinStocLn
    Right Field:ClosinStocLnAmt
    Local:Field:ClosinStocLn:Set as:"Less: Closing Stock :"
    Local:Field:ClosinStocLnAmt:Set as:mad:@BSClosingStockNew;@@GrossProfitTot; if ##SVVariance then @@VarOpValue else @@OpValue;@@VarOpValue;@@OpValue;$PurchaseGrpValue;@VertValue;""
    Local : Field : ClosinStocLnAmt : Display : Stock Group Summary : NOT $$IsIntegrated
    Local : Field : ClosinStocLnAmt : Display : Stock Summary : $$IsIntegrated
    [Field:ClosinStocLn]
    ;Style:Large Bold
    [Field:ClosinStocLnAmt]
    Space Right:20
    Border:Thick bottom
    Set Always:Yes


    [Line:CofGoodsAvaiLn]
    Space Top:1
    Field:CofGoodsAvaiLn
    Right Field:CofGoodsAvaiLnAmt
    Local:Field:CofGoodsAvaiLn:Set as:"Gross Profit :"
    Local:Field:CofGoodsAvaiLnAmt:Set as:(@@SalesTotVal + @@dirIncomTotVal) - (((@@BSOpeningStockNew + ##BodyBotomLin1Var) - (@@BSClosingStockNew)) + (@@DirExpfom));$SalesPlusDirIncStorage - ($CostOfGoosAvailStorage + @@DirExpfom);@@GrossProfitTot;@@SalesTotVal - (@@BSOpeningStockNew + @@PurchaseTotVal - @@BSClosingStockNew) ;@@GrossProfitTot; if ##SVVariance then @@VarOpValue else @@OpValue;@@VarOpValue;@@OpValue;$PurchaseGrpValue;@VertValue;""
    [Field:CofGoodsAvaiLn]
    Style:Large Bold
    Wide Space:Yes

    [Field:CofGoodsAvaiLnAmt]
    Border:Thick Top
    Style:Large Bold
    Use:Amount Field
    Set Always:Yes
    ;Storage:GrossPrStorage

    ;Space Right:20

    ;[Part:AddlCostCompP]
    ; Line:AddlCostCompP
    [Line:AddlCostCompP]
    Space Top:2
    Field:AddlCostCompP;,AddlCostCompP1,AddlCostCompP2
    Local:Field:AddlCostCompP:Set as:"Income Statement :"
    [Field:AddlCostCompP]
    ;Use:Name Field
    Style:Large Bold
    Wide Space:Yes
    Border:Thick Bottom

    ;;cost of sales cal before direct cost
    [Line:CostOfSalL]
    Field:CostOfSalFName
    Right Field:CostOfSalF

    [Field:CostOfSalFName]
    Use:Name Field
    Set as:"Cost Of Goods Available"
    [Field:CostOfSalF]
    Use:Amount Field
    Space Right:20
    Set Always:Yes
    ;Storage:CostOfGoosAvailStorage
    Set as:(@@BSOpeningStockNew + ##BodyBotomLin1Var) - (@@BSClosingStockNew)

    [Line:DirExpL]
    Space Top:.5
    Field:DirExpf
    Right Field:DirExpfAmt
    Local:Field:DirExpf:Set as:"Direct Expensess"
    Local:Field:DirExpfAmt:Set as:mad:@DirExpfom;VertPLDirExpenses;$BSDirExpense;@DirCost;"Income Statement :"


    [Field:DirExpf]
    Use:Name Field
    [Field:DirExpfAmt]
    Space Right:20
    Use:Amount Field
    Set Always:Yes

    [Line:InDirIncomL]
    Field:InDirIncomF
    Right Field:InDirIncomFAmt
    Local:Field:InDirIncomF:Set as:"Indirect Incomes"
    Local:Field:InDirIncomFAmt:Set as:mad:@InDirIncomTotVal;"Indirect Incomes"
    [Field:InDirIncomF]
    Use:Name Field
    [Field:InDirIncomFAmt]
    Use:Amount Field

    [Line:IndirectExpL]
    Space Top:.5
    Field:IndirectExpf
    Right Field:IndirectExpfAmt
    Local:Field:IndirectExpf:Set as:"Indirect Expensess"
    Local:Field:IndirectExpfAmt:Set as:mad:@IndirExpfom;"Income Statement :"


    [Field:IndirectExpf]
    Use:Name Field
    [Field:IndirectExpfAmt]
    Use:Amount Field
    Set Always:Yes

    [Line:NetPL]
    Space Top:.5
    Field:NetPf
    Right Field:NetPfAmt
    Local:Field:NetPf:Set as:"Net Profit"
    Local:Field:NetPfAmt:Set as:((@@SalesTotVal+@@dirIncomTotVal)-(((@@BSOpeningStockNew+##BodyBotomLin1Var)-(@@BSClosingStockNew))+(@@DirExpfom))) + (@@InDirIncomTotVal - @@IndirExpfom) ;(((@@SalesTotVal + @@dirIncomTotVal) - ($CostOfGoosAvailStorage + @@DirExpfom)) + @@InDirIncomTotVal) - (@@IndirExpfom);@@NetProfitTot1;"Income Statement :"

    [Field:NetPf]
    Use:Name Field
    Style:Large Bold
    Wide Space:Yes
    [Field:NetPfAmt]
    Style:Large Bold
    Border:Thick Top Bottom
    Use:Amount Field
    Set Always:Yes
    ;[Function:Ledger]
    ;;to exercute subform report
    [Report:exercSubFomRep]
    Form:exercSubFomRep

    [Form:exercSubFomRep]
    Height: 100 % Screen
    Width: 100 % Screen
    Part:exercSubFomRep
    [Part:exercSubFomRep]
    Line:exercSubFomRep
    [Line:exercSubFomRep]
    Field:exercSubFomRep

    [Field:exercSubFomRep]
    Type:Logical
    Table:YesNoTable
    Storage:exercSubFomRepStorage
    Style:Normal Bold
    Width:3
    Max:3
    Show Table:Always
    ;Set as:""
    Sub Form:OptVchRep:$$Value = Yes
    ;; adding total to optional Vch
    [#Form: DayBook]
    Add:Bottom Parts : DaybookTot
    [Part : DaybookTot]
    Background:red
    Line : DaybookTot
    Border: Column Titles
    [Line : DaybookTot]
    Right Field : DaybookTotl
    [Field : DaybookTotl]
    Use: Amount Field
    Storage:DaybookTotlStorages
    Set as:$$Total:DSPDBCrAmt;"kekfefke"

    [#Part: DB Body]
    Total:DSPDBCrAmt

    ;;purchase cal screen
    [Report:OptVchRep]
    ;Object:Company:##SvCurrentCompany

    ;Variable:BodyBotomLin1Variable
    ;Object:Company;:##SvCurrentCompany
    ;Variable:BodyBotomLin1Var
    Form:OptVchRep
    [Form:OptVchRep]
    Button:Refresh TDL,ChangePeriod
    Height: 100 % Screen
    Width: 100 % Screen

    Part:OptVchRep
    Bottom Part:OptVchRepbotPat
    ; Keys : ChangePeriod

    [Part:OptVchRep]
    Total:OptVchRepBodyAmt
    Line:DatLin;OptVchRepDatLinF
    Line:OptVchRep,OptVchRepBody
    ;Local:Line:OptVchRepBody:Invisible:yes
    ;Bottom Line:BodyBotomLin
    Repeat:OptVchRepBody:OptVchRepBodycol
    Scroll:Vertical
    ;[Line:OptVchRepDatLinF]
    ; Right Field:DSPMainDateTitle

    ;Right Field:OptVchRepDatLinF
    ;Local:Field:OptVchRepDatLinF:Set as:""; + $$String:##SVFromDate +"爐o�"+ $$String:##SVToDate

    ;[Field:OptVchRepDatLinF]
    ; Use:Date Field

    [Line:OptVchRep]
    Field:OptVchRepdt,OptVchRep,OptVchRep1
    Local:Field:OptVchRepdt: Set as: $$LocaleString:"Date"
    Local:Field:OptVchRep:Set as: $$LocaleString:"Particulars"
    Local:Field:OptVchRep1:Set as: $$LocaleString:"Purchase"
    [Field:OptVchRepdt]
    Use:Name Field
    [Field:OptVchRep]
    Use:Name Field
    ;Use:Amount Field
    ;Storage:OptVchRep
    [Field:OptVchRep1]
    Use:Name Field

    [Line:OptVchRepBody]

    Field:OptVchRepBodyDat,OptVchRepBody,OptVchRepBodyAmt
    Local:Field:OptVchRepBodyDat:Set as:$Date
    Local:Field:OptVchRepBody:Set as:$LedgerName
    ;Local:Field:OptVchRepBodyAmt: Set As :if $VoucherTypeName CONTAINS "Purchase" then ($Amount)-($Amount - $SubTotFAmtStorage) else ""
    Local:Field:OptVchRepBodyAmt: Set As :($Amount)-($Amount - (($Amount) - ($SubTotFAmtStorage:Company:##SVCurrentCompany)));if $VoucherTypeName CONTAINS "Purchase" then ($Amount)-($Amount - $SubTotFAmtStorage) else ""
    [Field:OptVchRepBodyDat]
    Use:Short Date Field
    [Field:OptVchRepBody]
    Use:Name Field
    [Field:OptVchRepBodyAmt]
    Background:Blue
    Use:Amount Field
    ;Use:Number Field
    Set Always:Yes
    [Part:OptVchRepbotPat]
    Line:OptVchRepbotPat
    [Line:OptVchRepbotPat]
    ;Use:OptVchRep
    ;Delete:Field:OptVchRep,OptVchRep1
    Field:BodyBotomLin,BodyBotomLin1
    ;Field:BodyBotomLin,BodyBotomLinAmtF
    Local:Field:BodyBotomLin:Set as:"Grand Total"
    Local:Field:BodyBotomLin1:Set as:$$Total:OptVchRepBodyAmt;"Ammount"
    [Field: BodyBotomLin]
    Use:Name Field
    [Field: BodyBotomLin1]
    Background:yellow
    Use:Amount Field
    Set Always:Yes
    ;Storage:TotalOptiVchValueStorage
    ;Variable:BodyBotomLin1Var
    ;Modifies:BodyBotomLin1Var
    ;;Adding purchase button on stock journal
    [#Form:Stock Journal Color]
    ; Background:GREEN
    ;Button:Optional Button
    Button:purchase Button,Refresh TDL
    ;Invisible:NOT $$IsSales:$VoucherTypeName

    ;Button:SetPurcInvType,Refresh TDL



    [#Form:purchase Color]
    Button:Refresh TDL
    ;Set : IsOptionalVoucher : Yes

    ;Delete:Button:purchase Button

    ;; delete purchase buttons from some screens
    [#Form:DayBook]
    Button:Refresh TDL
    [#Form:Sales Color]
    ;Delete:Button:purchase Button
    [#Form: POS Invoice Color]
    Delete:Button:purchase Button
    [#Form: Stock Journal Color]
    ;Local: Button : BottomToolBarBtn2_Accept : Inactive : $$Allow:Create:InventoryMaster
    Local: Button: Purchase Button : Inactive : $$InCreateMode:Create:StockJournalColor
    [#Form: Stock Journal Color]
    Local: Button: Purchase Button : Inactive : $$InAlterMode:Alter:StockJournalColor

    ;; pulling std cost rate onto optional Purchase screen
    ;;Rate

    ;;Sales and purchas List of stock items screen
    [#Line: STKALL Details]
    ; Delete:Field:VCH StockItem
    Border:Thick box
    [#Field: VCH StockItem]
    ;Background:red
    ; Use : Item Name Field
    ;CollVal : If $$IsSysNameEqual:NotApplicable:$CurBomName Then $$Value Else ##lvCompValues[$$Line].vStockItemName
    ; MfgrCollVal : If $PrevBOMName != $CurBOMName Then ##lvByCoValues[$$Line].vStockItemName +
    ; Else If $$IsSysNameEqual:NotApplicable:$CurBomName Then "" Else $$Value

    Sub Form : EI DescExplosion : ##ICFGAddlDesc AND NOT $$IsSysName:$$Value AND NOT $$IsExploded:EIDescExplosion AND @@IsInvoice ;;AND NOT @@IsCreditNote AND NOT @@IsDebitNote
    Sub Form : GRN Indent : ($$IsIndentOn) AND (($$IsPurchase:##SVVoucherType) AND (NOT $$IsMultiGodownOn AND NOT $$IsTrackingOn AND NOT $$IsPurcOrdersOn) AND (NOT $$IsEndofList:#VCHStockItem) AND (NOT @@HasBatchWise))
    Sub Form : Trader SalesDtls : @@IsExciseDealerOn AND $IsInvoice AND @@IsSales AND @@TraderItemTariff AND NOT $$IsSysNameEqual:Manufacturer:$ExciseRegistrationType:Godown:#EIExciseMfgrUnit AND @TraderBillsSrc
    Sub Form : Trader CreditNoteDtls : @@IsExciseDealerOn AND $IsInvoice AND @@IsCreditNote AND @@TraderItemTariff AND NOT $$IsSysNameEqual:Manufacturer:$ExciseRegistrationType:Godown:#EIExciseMfgrUnit
    Sub Form : Trader DebitNoteDtls : @@IsExciseDealerOn AND $IsInvoice AND @@IsDebitNote AND @@IsTraderInvoice AND @@TraderItemTariff AND @TraderBillsSrc
    Sub Form : Trader ExciseJrnlDtls : @@IsExciseDealerOn AND @@IsJournal AND @@IsTraderShortageClassJrnl AND @@TraderItemTariff AND $$IsSysNameEqual:Dealer:$ExciseRegistrationType:Godown:#EIExciseMfgrUnit AND $$IsLedofGrp:$LedgerName:$$GroupPurchase AND NOT $IsDeemedPositive AND @TraderJrnlBillsSrc
    ;;For Servicen Tax - With Inventory option is Yes
    Sub Form : STX VchTaxObject AllocIE : $$IsEndofList:#VCHStockItem AND $$Owner:$$IsSTXVchTaxObjectAllocSubForm
    Sub Form : STX JV TaxObject AllocIE : $$IsEndofList:#VCHStockItem AND $$Owner:$$IsSTXJVTaxObjectAllocSubForm
    ;Option : VCHACC StockItem : @@IsAccVch OR @@IsInvoice
    ;Switch : VCHStockItemType : VCHPHYSStockItem : $$IsPhysStock:##SVVoucherType
    ;Switch : VCHStockItemType : VCHJRNLStockItem : $$IsStockJrnl:##SVVoucherType
    Switch : VCHStockItemType : VCHINV StockItem : @@IsInvVch AND NOT $$IsPhysStock:##SVVoucherType AND NOT $$IsStockJrnl:##SVVoucherType AND NOT @@IsInvoice AND NOT @@IsJobMaterialVchs
    Switch : VCHStockItemType : VCH JobWork StockItem : @@IsJobMaterialVchs
    Switch : VCHStockItemType : VCH DNCENVATAvailing StockItem : @@IsDebitNote AND @@IsCENVATAvailing
    ;; Notify : MsgVATRate : @@IsIndianVAT AND ##VCFGVATRateMismatch AND ##ICFGCommonLED AND NOT $$IsSysName:$$Value AND $RateofVAT:TaxClassification:#VCHVATClass > 0 AND $RateofVAT:TaxClassification:#VCHVATClass != $ItemVATRate AND $ItemVATRate > 0
    ;Modifies : SV Stock Item

    Fetch Object : StockItem : $$Value : Name, PrevNarration, RateofMRP, IsMRPInclofTax, BaseUnits, AdditionalUnits, BasicTariffType, +
    IsBatchWiseOn, ClosingBalance, ClosingAsondate, BasicQty, BasicRateOfExcise, +
    StandardCost, StandardPrice, Description, HasMfgDate, IsPerishableOn, +
    ItemSDClass, PurchaseList.*, SalesList.*, Componentlist.*, +
    MultiComponentList.*, MultiComponentList.MultiComponentItemList.*, +
    ExciseItemGodown.NumItemsOfExciseDuties, ExciseItemGodown.*, ExciseItemGodown.ExciseMRPRates.*, +
    ExciseMethodOfCalc,ExciseAltRepUnits, ExciseRepUnits, ExciseAbatementPercentage, ExciseItemMRP, ExciseRepDenominator, +
    ExciseTypeofDutiesForTaxObj, ExciseMfgrRateofDuty, ExciseFGStockItemType, MRPBasedItemValue, IsAdditionalTax, IsCessExempted, +
    AltTaxObjExciseMethodOfCalc, ExciseItemValoremAmt, ExciseItemValoremAmt, ExciseCNItemValoremAmt, AltTaxObjExciseItemMRPAmt,+
    AltTaxObjExciseItemMRPValue, AltTaxObjInvExciseItemMRP, AltTaxObjExciseAbatementPercentage, IsSpecialAEDOfCVDExistsInStkItem, +
    CurrentStdPriceMethod, CurrentStdCostMethod, TaxClassificationName, Previous Sales, Previous Purchase, IsCostTrackingOn
    TraderBillsSrc : $$NumItems:TraderListOfPurcSrcGenerate => 0
    TraderJrnlBillsSrc : $$NumItems:TraderJrnlListOfPurcSrcGenerate => 0
    Validate : $$VATClassLVUpdOnEOL
    ;;----------------------------------------------------------------------------------------------
    ;;ADDING FIELDS ONTO OPTIONAL PURCHASE SCREEN TO CHECK STD COST AND SELLING PRICE RATE
    [#Line: EI ColumnOne]
    ;Invisible:NOT $$IsPurchase:$VoucherTypeName
    Add:Right Field:ColumnTitF,ColumnTitAmt,ColumnTitCheck
    Local:Field:ColumnTitF:Set as:"U Cost"
    Local:Field:ColumnTitAmt:Set as:"Amount"
    Local:Field:ColumnTitCheck:Set as:"Check"
    ;Local:Field:Default:Skip:Yes


    [Field: ColumnTitF]
    ;Use:Number Field
    Style:Large Bold
    Space Right:3
    Space Left:5
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName


    [Field: ColumnTitAmt]
    ;Use:Number Field
    Style:Large Bold
    Space Right:6
    Space Left:5
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName


    [Field: ColumnTitCheck]
    ;Use:Number Field
    Style:Large Bold
    Space Right:6
    Space Left:5
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName



    [#Line: EI InvInfo]
    ;Invisible:NOT $$IsPurchase:$VoucherTypeName
    Add:Right Fields:stdcostRatkondo,stdcostRatkondoAmt,stdcostRatkondoCheck
    Local:Field:stdcostRatkondo:Set as:mad:@StdVchRate
    Local:Field:stdcostRatkondoAmt :Set as:mad:@StdVchRate * $BilledQty
    Local:Field:stdcostRatkondoCheck :Set as:($Rate) - (@@StdVchRate)
    ;Local:Field:Default:Skip:Yes



    [Field: stdcostRatkondo]
    Use:Number Field
    Space Left:7
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName



    [Field: stdcostRatkondoAmt]
    Use:Number Field
    Space Left:7
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName




    [Field: stdcostRatkondoCheck]
    Use:Number Field
    Space Left:7
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName




    [#Line: EI InvSubTotal]
    ;Border:Thick Box
    ;Invisible:NOT $$IsPurchase:$VoucherTypeName
    Add:Right Fields:SubTotF,SubTotFAmt,SubTotCheck
    Local:Field:SubTotF:Set as:$$Total:stdcostRatkondo;""
    Local:Field:SubTotFAmt:Set as:$$Total:stdcostRatkondoAmt;""
    Local:Field:SubTotCheck:Set as:$$Total:stdcostRatkondoCheck;""
    ;Local:Field:Default:Skip:Yes


    [Field: SubTotF]
    Use:Number Field
    Set always : Yes
    Space Left:7
    Border:Thin Top
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName


    [Field: SubTotFAmt]
    ;Use:Number Field
    Use:Amount Field
    Set always : Yes
    Space Left:7
    Border:Thin Top
    Background:Green
    Storage:SubTotFAmtStorage
    Invisible:NOT $$IsPurchase:$VoucherTypeName



    [Field: SubTotCheck]
    Use:Number Field
    Set always : Yes
    Space Left:7
    Border:Thin Top
    Background:Green
    Invisible:NOT $$IsPurchase:$VoucherTypeName





    [#Form: Export Invoice]
    Use : VCHBASICForm
    Add : Top Parts : EI BaseInfo, EI Details
    Local : Field : VCH Narration : Lines : 2
    Local : Line : VCH NarrPrompt : Add : Right Fields : EI PartyDeemedPos, EI QtyTotal, EI RateTotal, EI RatePerTotal ,EI DiscTotal, EIValueTotal,ownf,TotAmtF,TotCheck
    Option : Small Size Form
    Option : EIDefaultBill : ##ICFGDefaultBill
    [Field:eek:wnf]
    Invisible:NOT $$IsPurchase:$VoucherTypeName
    Set as:$$Total:stdcostRatkondo;"522"
    Use:Number Field
    Style:Large Bold
    Space Left:14
    Border: Totals
    Background:Green
    Skip:Yes





    [Field:TotAmtF]
    Invisible:NOT $$IsPurchase:$VoucherTypeName
    Set as:$$Total:stdcostRatkondoAmt;"522"
    Use:Number Field
    Style:Large Bold
    Space Left:4
    Border: Totals
    Background:Green
    Skip:Yes

    [Field:TotCheck]
    Invisible:NOT $$IsPurchase:$VoucherTypeName
    Set as:$$Total:stdcostRatkondoCheck;"522"
    Use:Number Field
    Style:Large Bold
    Space Left:4
    Border: Totals
    Background:Green
    Skip:Yes


    [#Part: EINrmlDetails]
    Total:stdcostRatkondo
    Total:stdcostRatkondoAmt
    Total:stdcostRatkondoCheck




    [Variable:BodyBotomLin1Var]
    Type:Amount
    Set Always : Yes
    Persistent : No
    Volatile : Yes

    [System:variables]
    BodyBotomLin1Var:No
    [System:UDF]
    ;PurLinAmt:Amount:21000
    ; BodyBotomLin1Storage:Amount:21000
    PurLinAmt:Amount:21001
    CostOfGoosAvailStorage:Amount:21002
    SalesPlusDirIncStorage:Amount:21003
    GrossPrStorage:Amount:21004
    PurLinAmtStorage:Amount:21005
    SaleLnAmtStorage:Amount:21006
    SubTotFAmtStorage:Amount:21007
    TotalOptiVchValueStorage:Amount:21008
    exercSubFomRepStorage:Logical:21009
    DaybookTotlStorages:Amount:21010
    ; modify option or regular vch button
    [#Button: Optional Button]
    Key : Ctrl+L
    Action : Set : OptionalFlag : NOT ##OptionalFlag
    Title : if ##OptionalFlag then $$LocaleString:"Purchase" else $$LocaleString:"Inactive"
    ;Inactive : NOT @@IsOptionalAllowed
    ; Add :Button :OPPurchasCalRep
    [Button:OPPurchasCalRep]
    Title:"Hensco Purchase"
    Key:f3
    ;Action: Modify Variables :OptVchRep
    ;Action:Alter:OptVchRep
    Action:Display:OptVchRep;exercSubFomRep
    [Button:eek:therRepButtons]
    Title:"Related Rep"
    Key:f6
    ;Action: Modify Variables :OptVchRep
    Action:Display:RP GroupSummary
    ;; optional voucher amount report,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    [Collection :OptVchRepBodycol]
    Type : $VoucherTypeName:Optional Vouchers
    ; Type : Voucher;$VoucherTypeName:Optional Vouchers
    ;Child Of:$$VchTypePurchase ;;values are from sales voucher
    ;Belongs To:Yes

    Fetch :Date,LedgerName,Amount,SubTotFAmtStorage;,BodyBotomLin1Storage; Date,Amount,VoucherTypeName ,PArtyLedgerName,VoucherNumber
    ; Fetch :LedgerName,Amount,BodyBotomLin1Storage; Date,Amount,VoucherTypeName ,PArtyLedgerName,VoucherNumber

    [System:Formula]
    SalesTotVal : $ClosingBalance:Group:$$GroupSales:$$ledger
    dirIncomTotVal : $ClosingBalance:Group:$$GroupDirectIncomes:$$ledger
    PurchaseTotVal : $ClosingBalance:Group:$$GroupPurchase
    GrossProfitTot : $$AsPositive:$$Negative:$ClosingGrossProfit:Company:##SVCurrentCompany
    NetProfitTot1 : $$AsPositive:$$Negative:$ClosingProfit:Company:##SVCurrentCompany
    DirExpfom : $ClosingBalance:Group:$$GroupDirectExpenses:$$ledger
    IndirExpfom : $ClosingBalance:Group:$$GroupIndirectExpenses:$$ledger
    BSOpeningStockNew : $$AsPositive:$OpeningBalance:Group:$$GroupStock
    BSClosingStockNew : $$AsPositive:$ClosingBalance:Group:$$GroupStock
    InDirIncomTotVal : $ClosingBalance:Group:$$GroupIndirectIncomes:$$ledger
    ;OptionalVchTotVal :$VoucherTypeName:OptionalVouchers
    OptionalVchTotVal :$IsOptional:VoucherType:##SvVoucherType
    ; DaybookTotlStorages:""
    DaybookTotValu:$DaybookTotlStorages; $$Total:DSPDBCrAmt
    OptionalVchTotAmt :$$Owner:$IsOptional; $DaybookTotlStorages:Group:$$GroupPurchase:Company:##SVCurrentCompany;$$AsPositive:$$Negative:$DaybookTotlStorages:$$VchTypePurchase:$IsOptional;:Company:##SVCurrentCompany
    IsOptionalVoucher : @@IsOptional OR ($$IsMemo:$VoucherTypeName OR $$IsRevjrnl:$VoucherTypeName)
    IsOptional : $IsOptional
     


  2. kosi

    kosi Member


    any update
    anyone there to help me retrieve total field value from optional vouchers
     


  3. kosi

    kosi Member


    Please anyone there
    Give me idea how to fetch values from optional vouchers report
     


  4. kosi

    kosi Member




    Please anyone there
    Give me idea how to fetch values from optional vouchers report
     


Share This Page