Tuesday 21 June 2022

Customer- Item Rate fixed

 

[#Part: MST LED Explode Sundry]
    Add : Line : At end : ItemRateSetings
[Line :  ItemRateSetings]
  Field : Medium Prompt, ItemRateSetings
  Local : Field : Medium Prompt : Set As : "Set/Alter Item Rates :"
    [Field :  ItemRateSetings]
        use : Logical Field
        Set aS : No
      Sub form : ItemRateSF : $$Value
[Report : ItemRateSF]
    Form :ItemRateSF
    [Form :ItemRateSF]
        Part :ItemRateSF
        [Part :ItemRateSF]
            Line : ItemRateSF
            Repeat : ItemRateSF : ItemRatesAggregate
            Scroll : Vertical
            Break on : $$Isend:$MSTSFItemName
            [Line :ItemRateSF]
                Field : MSTSFItemName,MSTSFItemRate
          [Field : MSTSFItemName]
                  Use : Name Field
                    Storage :MSTSFItemName
                    Table : MyStockitems,End of List
                [Field : MSTSFItemRate] 
                    Use  : Amount Field
                    Storage :MSTSFItemRate
                    Inactive : $$IsEnd:$MSTSFItemName
[System : UDF]
 
ItemRatesAggregate    : Aggregate : 21000
MSTSFItemName        : String    : 21001
MSTSFItemRate        : Amount    : 21002
 
[Collection : MyStockitems]
  Title : "List of Items"
    Type : StockItem
    Format : $Name,25
 
[#Field: VCH NrmlRate]
 
    Control : MyRateControl : $(Ledger,$PartyLedgerName).ItemRatesAggregate[1,@@IsSameItem].MSTSFItemRate < $$Value And $$IsSales:##SVVoucherType
 
[System : Formula]
 
MyRateControl : "Rate Control"
IsSameItem : $$ReqObject:$StockitemName = $MSTSFItemName

Thursday 2 June 2022

AMC Module


;   ===================== voucher type entry level

[#Part:VTYP BehaviourMain ]
    Add    : Line    : After    :   VTYP PrintSave : Max_PG_AmcVchTypeYesNo
    

[Line:Max_PG_AmcVchTypeYesNo]
    Field    : medium prompt,Max_PG_AmcVchTypeYesNo
    
    Local    : Field        : Medium Prompt    : Set as    : "Use For AMC Voucher :"
    Local    : Field        : Medium Prompt    : Color        : blue
    

[Field    : Max_PG_AmcVchTypeYesNo]
    Use        : logical field
    Table    : yesno table
    Storage    : UDFAmcVoucher
    Show Table: Always
    Set Always: yes





[System    : UDF]
    UDFAmcVoucher    : Logical    : 8794



[System    : Formulae]
;    UDFAmcVoucherYesNo    : $UDFAmcVoucher:VoucherType:##SVVoucherType




;=============================== stock master



























;============================= VCXH ENTRY LAVAQL BACH

[#Line: VCHBATCH ColumnOne]
    Option        : amcColumnOne        : @@UDFAmcVoucherYesNo
    
[!Line    : amcColumnOne]
    Add        : Field    : At Beginning    : MAX_BC_SRNOTIT,MAX_BC_AMCSELETIT,MAX_BC_LASTDATETIT

[#Line: VCHBATCH ColumnTwo]
    Option        : amcColumnOne2        : @@UDFAmcVoucherYesNo
    
[!Line    : amcColumnOne2]
    Add        : Field    : At Beginning    : MAX_BC_SRNOTIT,MAX_BC_AMCSELETIT,MAX_BC_LASTDATETIT
    
    Local    : Field: MAX_BC_SRNOTIT            : SET AS    : ""
    Local    : Field: MAX_BC_AMCSELETIT         : SET AS    : ""
    Local    : Field: MAX_BC_LASTDATETIT    : SET AS    : ""


[Field : MAX_BC_SRNOTIT]
    Use       : Name Field
    Info      : "SR. NO"
    Style     : Small Bold
    Width     : 30 mms
    Color     : Blue
    Invisible    : $AMCYesNo:StockItem:$StockItemName="yes"
    Skip      : Yes
    

[Field : MAX_BC_AMCSELETIT]
    Use       : Name Field
    Info      : "AMC TYPE"
    Style     : Small Bold
    Width     : 20 mms
    Color     : Blue
    Skip      : Yes
    Invisible    : $AMCYesNo:StockItem:$StockItemName="No"

[Field : MAX_BC_LASTDATETIT]
    Use       : Name Field
    Info      : "LAST DATE"
    Style     : Small Bold
    Width     : 20 mms
    Color     : Blue
    Skip      : Yes





[#Line: STKVCH Batch2]
    Option        : amcColumnOne3        : @@UDFAmcVoucherYesNo
    
[!Line    : amcColumnOne3]
    Add        : Field    : At Beginning    : MAX_BC_SRNOFld,MAX_BC_AMCSELEFld,MAX_BC_LASTDATEFld


[Field : MAX_BC_SRNOFld]
    Use       : NUMBER Field
    Style     : Small
    Width     : 30 mms
    Storage      : BATCHSRNO
    Format        : "nO ZERO,NO COMMA"
    Set Always: yes
    Invisible    : $AMCYesNo:StockItem:$StockItemName="yes"

[Field : MAX_BC_AMCSELEFld]
    Use       : Name Field
    Storage        : BATCHAMCTYPE
    Table    : AmcTable
    Style     : Small
    Width     : 20 mms
    Invisible    : $AMCYesNo:StockItem:$StockItemName="No"
    

[Field : MAX_BC_LASTDATEFld]
    Use       : due daTE Field
    Storage        : STORAGELASTDATE
    Style     : Small
    Width     : 20 mms
    Set Always: Yes
    

[#Line: EI ColumnOne]
    ;Add    : Right Field    : Before    : VCH QtyTitle: MAX_BC_SRNOTIT,MAX_BC_AMCSELETIT,MAX_BC_LASTDATETIT

[#Line: CI InvInfo]
    ;Add    : Right Field    : Before    : VCHBilledQty    :     MAX_BC_SRNOFld1,MAX_BC_AMCSELEFld1,MAX_BC_LASTDATEFld1
    
    
    ;Local    : Field    : MAX_BC_SRNOFld1         : SET AS : $BatchAllocations[1].BATCHSRNO
    ;Local    : Field    : MAX_BC_AMCSELEFld1      :
    ;Local    : Field    : MAX_BC_LASTDATEFld1       : SET AS : $BatchAllocations[1].STORAGELASTDATE


[#Line: EI InvInfo]
;    Add    : Right Field    : Before    : VCHBilledQty    :     MAX_BC_SRNOFld1,MAX_BC_AMCSELEFld1,MAX_BC_LASTDATEFld1
    
    
    ;Local    : Field    : MAX_BC_SRNOFld1         : SET AS : $BatchAllocations[1].BATCHSRNO
    ;Local    : Field    : MAX_BC_AMCSELEFld1      : SET AS : $BatchAllocations[1].BATCHAMCTYPE
    ;Local    : Field    : MAX_BC_LASTDATEFld1       :





[Field : MAX_BC_SRNOFld1]
    Use       : NUMBER Field
    Style     : Small
     SET AS : $BatchAllocations[1].BATCHSRNO
    Width     : 30 mms
    Storage      : BATCHSRNO1
    Format        : "nO ZERO,NO COMMA"
    Set Always: yes
    Skip    : Yes
    Invisible    : $AMCYesNo:StockItem:$StockItemName="yes"
    

[Field : MAX_BC_AMCSELEFld1]
    Use       : Name Field
    Storage        : BATCHAMCTYPE1
    Table    : AmcTable
    SET AS : $BatchAllocations[1].BATCHAMCTYPE
    Style     : Small
    Width     : 20 mms
    Skip    : Yes
    Invisible    : $AMCYesNo:StockItem:$StockItemName="No"
    

[Field : MAX_BC_LASTDATEFld1]
    Use       : short daTE Field
    SET AS : $BatchAllocations[1].STORAGELASTDATE
    Storage        : STORAGELASTDATE1
    Style     : Small
    Width     : 20 mms
    Set Always: Yes
    Skip    : Yes









;====================================== party master


[#Part: MST LED Details]
    

    Add : Line : After : MST Parent : LedAmcDetals
    
[Line : LedAmcDetals]
    Field : Long Prompt,LedAmcDetals
    Local : Field: Long Prompt                 : Info :$$LocaleString:"Is AMC Taken ?"
    ;;Local : Field: Long Prompt : Invisible :  Not $$IsBelongsTo:$$GroupSundryDebtors
    Local : Field : Default                    : Inactive  : NOT (@@ParentGroupReservedName = @@GroupSundryDebtors)
    Local    : Field : Default                 : Color     : Blue
[Field : LedAmcDetals]
    Use         :     Name Field
    Set As         :     "No"
      Add         :     Sub Form     : LedAmcSubForm:    $$Value = yes
    Table        :      YesNoTable
    Storage     :      LedAmcYesNo
    Width        :     15
    Set always     :     Yes
    Show table     :     Always

[Report    : LedAmcSubForm]
    Form    : LedAmcSubForm
    
[Form    : LedAmcSubForm]
    Part    : LedAmcTitle,LedAmcSubForm
    Width    : 50% page
    Background    : white
    

[Part    : LedAmcTitle]
    Line    : LedAmcTitle

[Part    : LedAmcSubForm]
    Line    : LedAmcTitLn,LedAmcLn
    Repeat    : LedAmcLn    :AggrAMC ;CollectionForLedgsrReport;
    Scroll    : Vertical
    Float    : No
    Break On: $$IsEmpty:$STLedAmcDate
    Common Border:Yes
    Border    : THIN BOX
    


[Line    : LedAmcTitLn]
    Field        : TitLedAmcInvDate,TitLedAmcInvNo,TitLedAmcPer,TitLedAmcFrom,TitLedAmcTo,TitLedAmcNext,TitLedAmcAmount
    Border    : thin BOTTOM
    
    
    Local    : Field    : Default    : Align        : Center

[Field    : TitLedAmcPer]
    Use        : name field
    Info    : "AMC/Warranty Type "
    ;table    : AmcTable,endoflist
    Style     : Small
    Full Width: Yes
    
[Field    : TitLedAmcFrom]
    Use        : name field
    Info    : " From "
    Style     : Small
    Width     : 20 mms
    
[Field    : TitLedAmcInvDate]
    Use        : name field
    Info    : "Invoice Date "
    Style     : Small
    Width     : 25 mms
    
[Field    : TitLedAmcInvNo]
    Use        : name field
    Info    : "Invoice Num "
    Style     : Small
    Width     : 25 mms
    

    
[Field    : TitLedAmcTo]
    Use        : name field
    Info    : " To "
    Style     : Small
    Width     : 20 mms

[Field    : TitLedAmcNext]
    Use        : name field
    Info    : "Next Due Date "
    Style     : Small
    Width     : 30 mms
    
[Field    : TitLedAmcAmount]
    Use        : name field
    Info    : "Amount"
    Style     : Small
    Width     : 20 mms






[Collection    : CollectionForLedgsrReport]
    Type        : Vouchers    : VoucherType
    Child Of    : $$VchTypeSales
    Belongs To    : Yes
    Fetch        : Date,VoucherNumber,AMOUNT,COSTCENTRENAME,PartyLedgerName
Fetch        : STVchAmcPer,EiAmcYesNo        
Fetch        : STVchAmcFrom    
Fetch        : STVchAmcTo        
Fetch        : STVchAmcnext    
Fetch        : STVchAmcAmount    ,vchamc
Compute        : CollInvAmt            : $$CollAmtTotal:InventoryEntries:$Amount

Filter        : ledFilter



[System    : Formulae]
    ledFilter    : $PartyLedgerName=$$Owner:$name;#LedPartyname










[Line    : LedAmcLn]
    Field        : LedAmcInvDate,LedAmcInvNo,LedAmcPer,LedAmcFrom,LedAmcTo,LedAmcNext,LedAmcAmount;,LedPartyname
    Local    : Field    : Default    : Border    : Thin Right
    Local    : Field    : Default    : Set Always    : Yes

[Field    : LedAmcPer]
    Use        : name field
    Set as    : IF $$Line=1 THEN  $$CollectionField:$STVchAmcPer:1:CollectionForLedgsrReport eLSE IF $$Line=2 THEN  $$CollectionField:$STVchAmcPer:2:CollectionForLedgsrReport eLSE+
                    IF $$Line=3 THEN  $$CollectionField:$STVchAmcPer:3:CollectionForLedgsrReport eLSE IF $$Line=4 THEN  $$CollectionField:$STVchAmcPer:4:CollectionForLedgsrReport eLSE +
                    IF $$Line=5 THEN  $$CollectionField:$STVchAmcPer:5:CollectionForLedgsrReport eLSE IF $$Line=6 THEN  $$CollectionField:$STVchAmcPer:6:CollectionForLedgsrReport eLSE +
                    IF $$Line=7 THEN  $$CollectionField:$STVchAmcPer:7:CollectionForLedgsrReport eLSE IF $$Line=8 THEN  $$CollectionField:$STVchAmcPer:8:CollectionForLedgsrReport eLSE +
                    IF $$Line=9 THEN  $$CollectionField:$STVchAmcPer:9:CollectionForLedgsrReport eLSE IF $$Line=10 THEN  $$CollectionField:$STVchAmcPer:10:CollectionForLedgsrReport eLSE +
                    IF $$Line=11 THEN  $$CollectionField:$STVchAmcPer:11:CollectionForLedgsrReport eLSE IF $$Line=12 THEN  $$CollectionField:$STVchAmcPer:12:CollectionForLedgsrReport eLSE +
                    $$Value   ;$STVchAmcPer
    Storage    : STLedAmcPer
    table    : AmcTable,endoflist
    Style     : Small
    Full Width:Yes
    Skip    : $$IsEmpty:$STLedAmcDate

[Field    : LedAmcInvDate]
    Use        : uni Date field
    Set as    :  IF $$Line=1 THEN  $$CollectionField:$Date:1:CollectionForLedgsrReport eLSE IF $$Line=2 THEN  $$CollectionField:$Date:2:CollectionForLedgsrReport eLSE+
                    IF $$Line=3 THEN  $$CollectionField:$Date:3:CollectionForLedgsrReport eLSE IF $$Line=4 THEN  $$CollectionField:$Date:4:CollectionForLedgsrReport eLSE +
                    IF $$Line=5 THEN  $$CollectionField:$Date:5:CollectionForLedgsrReport eLSE IF $$Line=6 THEN  $$CollectionField:$Date:6:CollectionForLedgsrReport eLSE +
                    IF $$Line=7 THEN  $$CollectionField:$Date:7:CollectionForLedgsrReport eLSE IF $$Line=8 THEN  $$CollectionField:$Date:8:CollectionForLedgsrReport eLSE +
                    IF $$Line=9 THEN  $$CollectionField:$Date:9:CollectionForLedgsrReport eLSE IF $$Line=10 THEN  $$CollectionField:$Date:10:CollectionForLedgsrReport eLSE +
                    IF $$Line=11 THEN  $$CollectionField:$Date:11:CollectionForLedgsrReport eLSE IF $$Line=12 THEN  $$CollectionField:$Date:12:CollectionForLedgsrReport eLSE +
                    $$Value  ;$Date
    Storage    : STLedAmcDate
    Style     : Small
    Width     : 25 mms
    
    
[Field    : LedAmcInvNo]
    Use        : Name field
    Set as    :IF $$Line=1 THEN  $$CollectionField:$VoucherNumber:1:CollectionForLedgsrReport eLSE IF $$Line=2 THEN  $$CollectionField:$VoucherNumber:2:CollectionForLedgsrReport eLSE+
                    IF $$Line=3 THEN  $$CollectionField:$VoucherNumber:3:CollectionForLedgsrReport eLSE IF $$Line=4 THEN  $$CollectionField:$VoucherNumber:4:CollectionForLedgsrReport eLSE +
                    IF $$Line=5 THEN  $$CollectionField:$VoucherNumber:5:CollectionForLedgsrReport eLSE IF $$Line=6 THEN  $$CollectionField:$VoucherNumber:6:CollectionForLedgsrReport eLSE +
                    IF $$Line=7 THEN  $$CollectionField:$VoucherNumber:7:CollectionForLedgsrReport eLSE IF $$Line=8 THEN  $$CollectionField:$VoucherNumber:8:CollectionForLedgsrReport eLSE +
                    IF $$Line=9 THEN  $$CollectionField:$VoucherNumber:9:CollectionForLedgsrReport eLSE IF $$Line=10 THEN  $$CollectionField:$VoucherNumber:10:CollectionForLedgsrReport eLSE +
                    IF $$Line=11 THEN  $$CollectionField:$VoucherNumber:11:CollectionForLedgsrReport eLSE IF $$Line=12 THEN  $$CollectionField:$VoucherNumber:12:CollectionForLedgsrReport eLSE +
                    $$Value   ;$VoucherNumber
    Storage    : STLedAmcInvNo
    Style     : Small
    Width     : 25 mms
    Skip    : $$IsEmpty:$STLedAmcDate
    
[Field    : LedPartyname]
    Use        : Name field
    Set as    :$$Owner:$Name;'VoucherNumber
    ;Storage    : STLedAmcInvNo
    Style     : Small
    Width     : 25 mms
    ;Skip    : $$IsEmpty:$STLedAmcDate

;

[Field    : LedAmcFrom]
    Use        : Short Date field
    Set as    : IF $$Line=1 THEN  $$CollectionField:$STVchAmcFrom:1:CollectionForLedgsrReport eLSE IF $$Line=2 THEN  $$CollectionField:$STVchAmcFrom:2:CollectionForLedgsrReport eLSE+
                    IF $$Line=3 THEN  $$CollectionField:$STVchAmcFrom:3:CollectionForLedgsrReport eLSE IF $$Line=4 THEN  $$CollectionField:$STVchAmcFrom:4:CollectionForLedgsrReport eLSE +
                    IF $$Line=5 THEN  $$CollectionField:$STVchAmcFrom:5:CollectionForLedgsrReport eLSE IF $$Line=6 THEN  $$CollectionField:$STVchAmcFrom:6:CollectionForLedgsrReport eLSE +
                    IF $$Line=7 THEN  $$CollectionField:$STVchAmcFrom:7:CollectionForLedgsrReport eLSE IF $$Line=8 THEN  $$CollectionField:$STVchAmcFrom:8:CollectionForLedgsrReport eLSE +
                    IF $$Line=9 THEN  $$CollectionField:$STVchAmcFrom:9:CollectionForLedgsrReport eLSE IF $$Line=10 THEN  $$CollectionField:$STVchAmcFrom:10:CollectionForLedgsrReport eLSE +
                    IF $$Line=11 THEN  $$CollectionField:$STVchAmcFrom:11:CollectionForLedgsrReport eLSE IF $$Line=12 THEN  $$CollectionField:$STVchAmcFrom:12:CollectionForLedgsrReport eLSE +
                    $$Value   ;$STVchAmcFrom
    Storage    : STLedAmcFrom
    Style     : Small
    Width     : 20 mms
    Skip    : $$IsEmpty:$STLedAmcDate
    


[Field    : LedAmcTo]
    Use        : Short Date field
    Set as    :  IF $$Line=1 THEN  $$CollectionField:$STVchAmcTo:1:CollectionForLedgsrReport eLSE IF $$Line=2 THEN  $$CollectionField:$STVchAmcTo:2:CollectionForLedgsrReport eLSE+
                    IF $$Line=3 THEN  $$CollectionField:$STVchAmcTo:3:CollectionForLedgsrReport eLSE IF $$Line=4 THEN  $$CollectionField:$STVchAmcTo:4:CollectionForLedgsrReport eLSE +
                    IF $$Line=5 THEN  $$CollectionField:$STVchAmcTo:5:CollectionForLedgsrReport eLSE IF $$Line=6 THEN  $$CollectionField:$STVchAmcTo:6:CollectionForLedgsrReport eLSE +
                    IF $$Line=7 THEN  $$CollectionField:$STVchAmcTo:7:CollectionForLedgsrReport eLSE IF $$Line=8 THEN  $$CollectionField:$STVchAmcTo:8:CollectionForLedgsrReport eLSE +
                    IF $$Line=9 THEN  $$CollectionField:$STVchAmcTo:9:CollectionForLedgsrReport eLSE IF $$Line=10 THEN  $$CollectionField:$STVchAmcTo:10:CollectionForLedgsrReport eLSE +
                    IF $$Line=11 THEN  $$CollectionField:$STVchAmcTo:11:CollectionForLedgsrReport eLSE IF $$Line=12 THEN  $$CollectionField:$STVchAmcTo:12:CollectionForLedgsrReport eLSE +
                    $$Value   ;$STVchAmcTo
    Storage    : STLedAmcTo
    Style     : Small
    Width     : 20 mms
    Skip    : $$IsEmpty:$STLedAmcDate

[Field    : LedAmcNext]
    Use        : Short Date field
    Set as    :  IF $$Line=1 THEN  $$CollectionField:$STVchAmcnext:1:CollectionForLedgsrReport eLSE IF $$Line=2 THEN  $$CollectionField:$STVchAmcnext:2:CollectionForLedgsrReport eLSE+
                    IF $$Line=3 THEN  $$CollectionField:$STVchAmcnext:3:CollectionForLedgsrReport eLSE IF $$Line=4 THEN  $$CollectionField:$STVchAmcnext:4:CollectionForLedgsrReport eLSE +
                    IF $$Line=5 THEN  $$CollectionField:$STVchAmcnext:5:CollectionForLedgsrReport eLSE IF $$Line=6 THEN  $$CollectionField:$STVchAmcnext:6:CollectionForLedgsrReport eLSE +
                    IF $$Line=7 THEN  $$CollectionField:$STVchAmcnext:7:CollectionForLedgsrReport eLSE IF $$Line=8 THEN  $$CollectionField:$STVchAmcnext:8:CollectionForLedgsrReport eLSE +
                    IF $$Line=9 THEN  $$CollectionField:$STVchAmcnext:9:CollectionForLedgsrReport eLSE IF $$Line=10 THEN  $$CollectionField:$STVchAmcnext:10:CollectionForLedgsrReport eLSE +
                    IF $$Line=11 THEN  $$CollectionField:$STVchAmcnext:11:CollectionForLedgsrReport eLSE IF $$Line=12 THEN  $$CollectionField:$STVchAmcnext:12:CollectionForLedgsrReport eLSE +
                    $$Value   ;$STVchAmcnext
    Storage    : STLedAmcnext
    Style     : Small
    Width     : 30 mms
    Skip    : $$IsEmpty:$STLedAmcDate
    
[Field    : LedAmcAmount]
    Use        : Amount field
    Set as    :  IF $$Line=1 THEN  $$CollectionField:$STVchAmcAmount:1:CollectionForLedgsrReport eLSE IF $$Line=2 THEN  $$CollectionField:$STVchAmcAmount:2:CollectionForLedgsrReport eLSE+
                    IF $$Line=3 THEN  $$CollectionField:$STVchAmcAmount:3:CollectionForLedgsrReport eLSE IF $$Line=4 THEN  $$CollectionField:$STVchAmcAmount:4:CollectionForLedgsrReport eLSE +
                    IF $$Line=5 THEN  $$CollectionField:$STVchAmcAmount:5:CollectionForLedgsrReport eLSE IF $$Line=6 THEN  $$CollectionField:$STVchAmcAmount:6:CollectionForLedgsrReport eLSE +
                    IF $$Line=7 THEN  $$CollectionField:$STVchAmcAmount:7:CollectionForLedgsrReport eLSE IF $$Line=8 THEN  $$CollectionField:$STVchAmcAmount:8:CollectionForLedgsrReport eLSE +
                    IF $$Line=9 THEN  $$CollectionField:$STVchAmcAmount:9:CollectionForLedgsrReport eLSE IF $$Line=10 THEN  $$CollectionField:$STVchAmcAmount:10:CollectionForLedgsrReport eLSE +
                    IF $$Line=11 THEN  $$CollectionField:$STVchAmcAmount:11:CollectionForLedgsrReport eLSE IF $$Line=12 THEN  $$CollectionField:$STVchAmcAmount:12:CollectionForLedgsrReport eLSE +
                    $$Value   ;$STVchAmcAmount
    Storage    : STLedAmcAmount
    Style     : Small
    Width     : 20 mms
    Skip    : $$IsEmpty:$STLedAmcDate




    ;Line    : LedAmcTitle,LedAmcPer,LedAmcFrom,LedAmcNext
    
    
[Line    : LedAmcTitle]
    Field    : Name Field
    Space Bottom: 2 mms

    Local    : Field    : name field    : Info    : "AMC/Warranty Details"
    Local    : Field    : name field    : Full Width: Yes
    Local    : Field    : name field    : Align    : Center
    Local    : Field    : name field    : Border    : Thin bottom


;-------------------------- vch level





[Collection: AmcTable]                        

    List Name   : $$LocaleString:"AMC Half Yearly ", $$LocaleString:"AMC Yearly",$$LocaleString:"AMC Quarterly",$$LocaleString:"Warranty Half Yearly ", $$LocaleString:"Warranty Yearly",$$LocaleString:"Warranty Quarterly"
    Title       : $$LocaleString:"Warranty/AMC Type"
    Format      : $Name,15
    Client Only : Yes
    Full Height    : Yes
    Align        : Right
    
[Collection: WarrantyTable]                        

    List Name   : $$LocaleString:"Warranty Half Yearly ", $$LocaleString:"Warranty Yearly",$$LocaleString:"Warranty Quarterly"
    Title       : $$LocaleString:"Warranty Type"
    Format      : $Name,15
    Client Only : Yes
    Full Height    : Yes
    Align        : Right

;============================================================================ voucher entry level

[#Part: EI BaseInfo]
    Option        : amcBaseInfo        : @@issales;@@UDFAmcVoucherYesNo
    
[!Part    : amcBaseInfo]
    Add        : Line    : At Beginning    : EIAmcDetals
    
[Line : EIAmcDetals]
    Field : Long Prompt,EIAmcDetals
    Local : Field: Long Prompt                 : Info :$$LocaleString:"Invoice Type :"
    Local : Field: Long Prompt                 : Width    : 35 MMS
    
    Local    : Field : Default                 : Color     : Blue
    ;Invisible    : Yes
[Field : EIAmcDetals]
    Use         :     Name Field
    ;Set As         :     @@UDFAmcVoucherYesNo
    Table        :      AMCWarrantyTable,None
    Storage     :      EiAmcYesNo
    Width        :     15
    Set always     :     Yes
    Show table     :     Always
    ;Skip Forward:Yes



;************ YesNoTable ********************;
[Collection: AMCWarrantyTable]                        

    List Name   : $$LocaleString:"AMC", $$LocaleString:"Warranty"
    Title       : $$LocaleString:"AMC / Warranty"
    Format      : $Name,15
    Client Only : Yes
    Full Height: Yes
    Align        : Right


;============
















;================================================================= amc
[System    : Formulae]
    UDFAmcVoucherYesNo: $EiAmcYesNo="AMC"

[#Part: VCH Narration]
    Option        : amcNarration        :( @@issales and $EiAmcYesNo="AMC") or ( @@issales and $EiAmcYesNo="Warranty")
    
[!Part    : amcNarration]
    Add        : Switch    : At Beginning :VchAmcPart    : VchAmcPart    : Yes;$EiAmcYesNo="yes"
[!Part    : VchAmcPart]
    Line    : VchAmcPer,VchAmcFrom,VchAmcNext
    




[Line    : VchAmcPer]
    Field    : Medium Prompt,VchAmcPer,VchAmcDays
    
    Local    : Field    :  Medium Prompt    : Info    : if  $EiAmcYesNo="AMC" then "AMC Type :" else if  $EiAmcYesNo="Warranty" then "Warranty Type :" else ""
    Local    : Field    :  Medium Prompt    : Width    : 35 mms

[Field    : VchAmcPer]
    Use        : name field
    Set as    : if @@UDFAmcVoucherYesNo then "AMC Yearly" else "Warranty Yearly"
    Storage    : STVchAmcPer
    table    : AmcTable
    Style     : Small
    Width     : 30 mms
    
[Field    : VchAmcDays]
    Use        : Number field
    Set as    : if $STVchAmcPer="AMC Half Yearly" then $$Number:180  else if $STVchAmcPer="AMC Yearly" then $$Number:365 else if $STVchAmcPer="AMC Quarterly" then $$Number:90 else if $STVchAmcPer="Warranty Half Yearly" then $$Number:180  else if $STVchAmcPer="Warranty Yearly" then $$Number:365 else if $STVchAmcPer="Warranty Quarterly" then $$Number:90 else  $$Number:365
    Storage    : STVchAmcDays
    ;table    : AmcTable
    Style     : Small
    Width     : 20 mms
    Set Always:Yes
    Invisible:Yes




    
[Line    : VchAmcFrom]
    Field    : Medium Prompt,VchAmcFrom
     Field: Short Prompt,VchAmcTo
    
    Local    : Field    :  Medium Prompt    : Info    : if  @@UDFAmcVoucherYesNo then "AMC Stat :" else "Warranty Start :"
    Local    : Field    :  Short Prompt        : Info    : if  @@UDFAmcVoucherYesNo then "AMC End :" else "Warranty End :"
    Local    : Field    :  Medium Prompt    : Width    : 35 mms

[Field    : VchAmcFrom]
    Use        : Short Date field
    Set as    : $date;$STLedAmcFrom:ledger:$partyledgername
    Storage    : STVchAmcFrom
    Style     : Small
    Width     : 20 mms
    Skip Forward: Yes
    Set Always:yes
    
    
[Field    : VchAmcTo]
    Use        : Short Date field
    Set as    : $STVchAmcFrom+$STVchAmcDays;$STLedAmcTo:ledger:$partyledgername
    Storage    : STVchAmcTo
    Style     : Small
    Set Always: Yes
    Skip Forward:Yes
    Width     : 20 mms
    



[Line    : VchAmcNext]
    Field    : Medium Prompt,VchAmcNext,VchAmcAmount1
    Field: Short Prompt,VchAmcAmount,VchActualBill,
    Local    : Field    :  Medium Prompt    : Width    : 35 mms
    
    Local    : Field    :  Medium Prompt    : Info    : "Next Due Date :"
    Local    : Field    :  Short Prompt        : Info    : "Amount :"

[Field    : VchAmcNext]
    Use        : Short Date field
    Set as    : $STVchAmcFrom+$STVchAmcDays+1
    Storage    : STVchAmcnext
    Style     : Small
    Width     : 20 mms
    Set Always:yes
    
[Field    : VchAmcAmount1]
    Use        : Amount field
    Set as    : $$Total:VCHValue ;if not $$IsEmpty:$$Total:VCHValue then  else if $$inaltermode then  $$value else $$Value;$STLedAmcAmount:ledger:$partyledgername
    ;Storage    : STVchAmcAmount
    Style     : Small
    Width     : 20 mms
    Set Always:Yes
    Invisible:Yes


[Field    : VchAmcAmount]
    Use        : Amount field
    Set as    : if not $$isempty:$STVchAmcAmount then $$value else if $$isempty:$STVchAmcAmount then #VchAmcAmount1 else if $$inaltermode then  $$value else $STVchAmcAmount
    Storage    : STVchAmcAmount
    Style     : Small
    Width     : 20 mms
    Set Always:Yes
    
[Field    : VchActualBill]
    Use        : Name field
    Set as    : if @invamout=$STVchAmcAmount then "Actual Amc" else "Free Amc"
    Local Formula: invamout    : $$CollAmtTotal:InventoryEntries:$Amount
    Storage    : vchamc
    Invisible: Yes
    Set Always: Yes
    


[System    : UDF]
    AggrigateStockDescription    : Aggregate    : 8701
    StockDesc                    : String    : 8702
    ATOCKdESrEAPET                : Aggregate    : 8703
    mystock                        : String    : 8704
    StockDescYesNo                : Logical    : 8705
    AMCYesNo                    : Logical    : 8706
    BATCHSRNO                    : Number    : 8707
    BATCHAMCTYPE                : String    : 8708
    STORAGELASTDATE                : Due Date    : 8709
    
;------------ led master
    LedAmcYesNo                    : String    : 8710
    AggrAMC                        : Aggregate    : 8100
    STLedAmcPer                    : String    : 8711
    STLedAmcFrom                : Date        : 8712
    STLedAmcTo                    : Date        : 8713
    STLedAmcnext                : Date        : 8714
    STLedAmcAmount                : Amount    : 8715
    STLedAmcDate                  : Date        : 8101
    STLedAmcInvNo                : String    : 8102
    
    EiAmcYesNo                    :String        : 8716
    STVchAmcPer                    : String    : 8717
    STVchAmcFrom                : Date        : 8718
    STVchAmcTo                    : Date        : 8719
    STVchAmcnext                : Date        : 8720
    STVchAmcAmount                : Amount    : 8721
    vchamc                        : String    : 8722
    STVchAmcDays                : Number    : 8723


;===================================== report

[#Menu: Gateway of Tally]
Add    :    Key Item    :    Before    :    @@LocQuit    :    "AMC REPORT" : C    :    Menu    : MAX_AMCREPORT

[Menu    : MAX_AMCREPORT]
    Key Item    : "Warrenty Report"    : W : Display    : Max_FreeAmc
    Key Item    : "AMC Report"    : A : Display    : Max_BillAmc
    Key Item        : " Ledger Master UpDate": l : Alter : NS Ledgermaster Import

[Report: Max_FreeAmc]

    Use            : DSP Template
    Form        : Max_FreeAmc
    Variable    : VarAlterVchTallyAlter;
    Set            : VarAlterVchTallyAlter    : Yes
    Variable    : SetNFPeriodFrom1
    Variable    : SetNFPeriodTo1
    Set            : SetNFPeriodFrom1    : "1/4/17";##SVFromDate;$$SysInfo:SystemDate
    Set            : SetNFPeriodTo1        : "1/4/2050";##SVToDate;$$SysInfo:SystemDate



[Form    : Max_FreeAmc]
    ;Use: DSP TEMPLATE
    Part    : Max_FreeAmcTOPPART,Max_FreeAmcSDTLSPART
    Buttons        : PrintButton, ExportButton,DUEDATEButton; JFilterDUEDATE
    Button      : ExplodeFlag, F2ChangePeriod, ChangeCompany,AMCCONFIG
    Keys        : ChangePeriod
    Background: black
    
[Part    : Max_FreeAmcTOPPART]
    
    Line        : Max_FreeAmcTOPPART
    Background    : Light Orange
    Space Bottom    : 2 mms
    

[Line    : Max_FreeAmcTOPPART]
    Field            : Short Name Field
    Right Field        : Name Field
    Space Top        : 1 MMS
    Space Bottom    : 1 MMS
    
    Local    : Field    : Short Name Field  : Set as        : @@CMPMAILNAME;"Date :"
    Local    : Field    : Short Name Field  : Full Width    : Yes
    Local    : Field    : Name Field  : Set as        : $$String:@@DSPDateStr
    Local    : Field    : Name Field  : Align        : Right
    Local    : Field    : Name Field  : Width        : 20% PAGE
    Local    : Field    : Default      : Color        : Blue
    Local    : Field    : Default  : Style        : DSRSTYLE


[Style : DSRSTYLE]

    Font    : "Book Antiqua"
    Bold    : Yes
    Height    : 15
    
[Part    : Max_FreeAmcSDTLSPART]
    Line    : Max_FreeAmcSDTLSTitle,Max_FreeAmcSDTLS
    Repeat    : Max_FreeAmcSDTLS: CollForWarrenty
    Scroll    : Both
    Float    : No
    Common Border: Yes
    Border    : thin box
    Background    : Stone Wash

[Line    : Max_FreeAmcSDTLSTitle]
    Field    : Max_PL_VchDate,Max_PL_VchNo,Max_PL_PartyGroupName,Max_PL_PartyName,Max_PL_Address,Max_PL_Consignee,Max_PL_ConsigneeAddress, +
                Max_PL_MobNo,Max_PL_PhoneNo,Max_PL_EmailId,
                
    Right Field    : Max_PL_From,Max_PL_To,Max_PL_Duedarte,Max_PL_Amount,Max_PL_BillAmount,Max_PL_AMCName


    Border        : Thin Bottom
    
    Local    : Field    : Max_PL_PartyGroupName        : Info : "Sales Man"
    Local    : Field    : Max_PL_Address            : Info : "Address"
    Local    : Field    : Max_PL_Consignee            : Info  : "Consignee"
    Local    : Field    : Max_PL_ConsigneeAddress   : Info  : "Consignee Address "
    Local    : Field    : Max_PL_PhoneNo             : Info  : "Phone No"

    Local    : Field    : Max_PL_VchDate            : Info  : "Vch No."
    Local    : Field    : Max_PL_VchNo                : Info  : "Vch Date"
    Local    : Field    : Max_PL_PartyName            : Info  : "Party Name        "
    Local    : Field    : Max_PL_MobNo                : Info  : "Mob No.    "
    Local    : Field    : Max_PL_EmailId             : Info  : "E maiil ID "
    Local    : Field    : Max_PL_AmcPeriod           : Info  : "Warranty Type"
    Local    : Field    : Max_PL_From                  : Info  : "From"
    Local    : Field    : Max_PL_To                 : Info  : "To "
    Local    : Field    : Max_PL_Duedarte              : Info  : "Due Date "
    Local    : Field    : Max_PL_Amount               : Info  : "Amount "
    
    Local    : Field        : Default                    : Type    : String
    Local    : Field        : Default                    : Border: thin right
    Local    : Field        : Default                    : Align    : Center
    Local    : Field        : Default                    : Color : Blue
    Local    : Field        : Default                    : Skip    : Yes
    Local    : Field        : Default                    : Color    : Red
    Local    : Field        : Default                    : Style    : large bold





[Line    : Max_FreeAmcSDTLS]
    Field    : Max_PL_VchDate,Max_PL_VchNo,Max_PL_PartyGroupName,Max_PL_PartyName,Max_PL_Address,Max_PL_Consignee,Max_PL_ConsigneeAddress, +
                Max_PL_MobNo,Max_PL_PhoneNo,Max_PL_EmailId,
                
    Right Field    : Max_PL_From,Max_PL_To,Max_PL_Duedarte,Max_PL_Amount,Max_PL_BillAmount,Max_PL_AMCName,DSPVchMasterIDNoTally13


    Border        : Thin Bottom
    Local    : Field    : Max_PL_PartyGroupName        : Set as : $Parent:Ledger:$PartyLedgerName
    Local    : Field    : Max_PL_Address            : Set as : $$FullList:PartyAddress1:$Address
    Local    : Field    : Max_PL_Consignee            : Set as : $BasicBuyerName
    Local    : Field    : Max_PL_ConsigneeAddress   : Set as : $$FullList:BuyerAddress1:$Address;"Consignee Address "
    Local    : Field    : Max_PL_PhoneNo             : Set as :  $Parent:Ledger:$PartyLedgerName

    Local    : Field    : Max_PL_VchDate            : Set as : $Date
    Local    : Field    : Max_PL_VchNo                : Set as : $Vouchernumber
    Local    : Field    : Max_PL_PartyName            : Set as : $PartyLedgerName
    Local    : Field    : Max_PL_MobNo                : Set as : $LedgerMobile:ledger:$PartyLedgerName
    Local    : Field    : Max_PL_EmailId             : Set as : $EMail:ledger:$PartyLedgerName
    Local    : Field    : Max_PL_AmcPeriod           : Set as : $STVchAmcPer        
    Local    : Field    : Max_PL_From                  : Set as : $STVchAmcFrom    
    Local    : Field    : Max_PL_To                 : Set as : $STVchAmcnext        
    Local    : Field    : Max_PL_Duedarte              : Set as : $STVchAmcnext    
    Local    : Field    : Max_PL_Amount               : Set as : $STVchAmcAmount
    Local    : Field        : Default        : Style  : nORMAL
    
Explode        : InventoryExplodeLevel: YES
    
    Option      : AlterVchOnEnterTallyAccess     : ##VarAlterVchTallyAlter
    
[Part    : InventoryExplodeLevel]
    Line    : InventoryExplodeLevel
    Repeat    : InventoryExplodeLevel    : eXPLODECollForWarrenty
    Scroll    : Vertical
    Float    : No
    
    
[Line    : InventoryExplodeLevel]
    Field    : Max_PL_VchDate,Max_PL_VchNo,Max_PL_PartyGroupName,Max_PL_PartyName,Max_PL_Address,Max_PL_Consignee,Max_PL_ConsigneeAddress, +
                Max_PL_MobNo,Max_PL_PhoneNo,Max_PL_EmailId,
                
    Right Field    : Max_PL_From,Max_PL_To,Max_PL_Duedarte,Max_PL_Amount,Max_PL_BillAmount,Max_PL_AMCName
    


    Local    : Field    : Max_PL_PartyGroupName        : Set as : ""
    Local    : Field    : Max_PL_Address            : Set as : ""
    Local    : Field    : Max_PL_Consignee            : Set as : ""
    Local    : Field    : Max_PL_ConsigneeAddress   : Set as : ""
    Local    : Field    : Max_PL_PhoneNo             : Set as : ""
                                                           
    Local    : Field    : Max_PL_VchDate            : Set as : ""
    Local    : Field    : Max_PL_VchNo                : Set as : ""
    Local    : Field    : Max_PL_PartyName            : Set as : $StockItemName
    Local    : Field    : Max_PL_MobNo                : Set as : $rATE
    Local    : Field    : Max_PL_EmailId             : Set as : ""
    Local    : Field    : Max_PL_AmcPeriod           : Set as : ""
    Local    : Field    : Max_PL_From                  : Set as : ""
    Local    : Field    : Max_PL_To                 : Set as : ""
    Local    : Field    : Max_PL_Duedarte              : Set as : ""
    Local    : Field    : Max_PL_Amount               : Set as : $AMOUNT
    Local    : Field        : Default        : Style  : nORMAL


[Collection    : CollForWarrenty]
    Type        : Vouchers    : VoucherType
    Child Of    : $$VchTypeSales
    Belongs To    : Yes
    Fetch        : Date,VoucherNumber,AMOUNT,COSTCENTRENAME,PartyLedgerName,BasicBuyerName
Fetch        : STVchAmcPer,EiAmcYesNo        
Fetch        : STVchAmcFrom    
Fetch        : STVchAmcTo        
Fetch        : STVchAmcnext    
Fetch        : STVchAmcAmount    ,vchamc
Compute        : CollInvAmt            : $$CollAmtTotal:InventoryEntries:$Amount
Filter    : nonAmcCollFilter
;Filter    : FilterPartyName
Filter    : DateperFilter11


[Collection    : eXPLODECollForWarrenty]
    Source Collection    : REPORTSALESCOLLECTION;CollForWarrenty
    Walk                : Inventory Entries
    Fetch                : StockItemName,rATE,AMOUNT
    Compute                : VoucherNumber1    : $VoucherNumber
    ;Filter                : vCHnOfILTWER


[System    : Formulae]
    nonAmcCollFilter    : $EiAmcYesNo="Warranty"
    vCHnOfILTWER        : $VoucherNumber1=#Max_PL_VchNo

; f  $EiAmcYesNo="AMC" then "AMC Type :" else if  $EiAmcYesNo="Warranty" then



    [Collection: PartyAddress1]
    Type        : Address   : Ledger
    Child of    : $PartyLedgerName
    Fetch        : Address

[Collection: BuyerAddress1]
    Type        : Address   : Ledger
    Child of    : $BasicBuyerName
    Fetch        : Address


[System    : Formulae]
    FilterPartyName        : If Not ##JFilterAMCType = $$SysName:AllItems Then $vchamc = ##JFilterAMCType Else 1=1
    
    DateperFilter11        : If ##SetNFPeriodFrom1 = "" And ##SetNFPeriodTo1 = "" Then 1=1 Else $STVchAmcTo Between ##SetNFPeriodFrom1  And ##SetNFPeriodTo1
    




;============ sale bill'




[Report: Max_BillAmc]

    Use            : DSP Template
    Form        : Max_BillAmc
    Set            : VarAlterVchTallyAlter    : Yes
    Variable    : VarAlterVchTallyAlter
    Variable    : JFilterAMCType    
    Set            : JFilterAMCType    : $$SysName:ALLItems
    Variable    : SetNFPeriodFrom1
    Variable    : SetNFPeriodTo1
    Set            : SetNFPeriodFrom1    : "1/4/17";##SVFromDate;$$SysInfo:SystemDate
    Set            : SetNFPeriodTo1        : "1/4/2050";##SVToDate;$$SysInfo:SystemDate


[Form    : Max_BillAmc]
    ;Use: DSP TEMPLATE
    Part    : Max_FreeAmcTOPPART,Max_BillAmcPART
    Buttons        : PrintButton, ExportButton,AMCTypeButton,DUEDATEButton; JFilterDUEDATE
    Button      : ExplodeFlag, F2ChangePeriod, ChangeCompany,AMCCONFIG
    Bottom Toolbar Buttons     : BottomToolBarBtn5;[Key: BottomToolBarBtn5]
    Keys        : ChangePeriod
    Background: black
    



    
[Part    : Max_BillAmcPART]
    Line    : Max_BillAmcSDTLSTitle,Max_BillAmcSDTLS
    Repeat    : Max_BillAmcSDTLS: REPORTSALESCOLLECTION
    Scroll    : both
    Float    : No
    Common Border: Yes
    Border    : thin box
    Background    : white

[Line    : Max_BillAmcSDTLSTitle]
    Field    : Max_PL_VchDate,Max_PL_VchNo,Max_PL_PartyGroupName,Max_PL_PartyName,Max_PL_Address,Max_PL_Consignee,Max_PL_ConsigneeAddress, +
                Max_PL_MobNo,Max_PL_PhoneNo,Max_PL_EmailId,
                
    Right Field    : Max_PL_From,Max_PL_To,Max_PL_Duedarte,Max_PL_Amount,Max_PL_BillAmount,Max_PL_AMCName


    
    


    Border        : Thin Bottom
    
    Local    : Field    : Max_PL_PartyGroupName        : Info : "Sales Man"
    Local    : Field    : Max_PL_Address            : Info : "Address"
    Local    : Field    : Max_PL_Consignee            : Info  : "Consignee"
    Local    : Field    : Max_PL_ConsigneeAddress   : Info  : "Consignee Address "
    Local    : Field    : Max_PL_PhoneNo             : Info  : "Phone No"




    Local    : Field    : Max_PL_VchDate            : Info : "Vch Date"
    Local    : Field    : Max_PL_VchNo                : Info : "Vch No."
    Local    : Field    : Max_PL_PartyName            : Info  : "Party Name        "
    Local    : Field    : Max_PL_MobNo                : Info  : "Mob No.    "
    Local    : Field    : Max_PL_EmailId             : Info  : "E mail ID "
    Local    : Field    : Max_PL_AmcPeriod           : Info  : "AMC Period"
    Local    : Field    : Max_PL_From                  : Info  : "From"
    Local    : Field    : Max_PL_To                 : Info  : "To "
    Local    : Field    : Max_PL_Duedarte              : Info  : "Due Date "
    Local    : Field    : Max_PL_Amount               : Info  : "Amount "
    Local    : Field    : Max_PL_BillAmount            : Info    : "Bill Amount"
    Local    : Field    : Max_PL_AMCName            : Info    : "AMC Type"
    
    Local    : Field        : Default                    : Type    : String
    Local    : Field        : Default                    : Border: thin right
    Local    : Field        : Default                    : Align    : Center
    Local    : Field        : Default                    : Color : Blue
    Local    : Field        : Default                    : Skip    : Yes
    Local    : Field        : Default                    : Style    : Large bold


[Line    : Max_BillAmcSDTLS]
    Field    : Max_PL_VchDate,Max_PL_VchNo,Max_PL_PartyGroupName,Max_PL_PartyName,Max_PL_Address,Max_PL_Consignee,Max_PL_ConsigneeAddress, +
                Max_PL_MobNo,Max_PL_PhoneNo,Max_PL_EmailId,
                
    Right Field    : Max_PL_From,Max_PL_To,Max_PL_Duedarte,Max_PL_Amount,Max_PL_BillAmount,Max_PL_AMCName,DSPVchMasterIDNoTally13

     Keys                : Line Duplicate Voucher

    Border        : Thin Bottom
        
    Local    : Field    : Max_PL_PartyGroupName        : Set as : $Parent:Ledger:$PartyLedgerName
    Local    : Field    : Max_PL_Address            : Set as : $$FullList:PartyAddress1:$Address
    Local    : Field    : Max_PL_Consignee            : Set as : $BasicBuyerName
    Local    : Field    : Max_PL_ConsigneeAddress   : Set as : $$FullList:BuyerAddress1:$Address
    Local    : Field    : Max_PL_PhoneNo             : Set as :  $Parent:Ledger:$PartyLedgerName
    
    Local    : Field    : Max_PL_VchDate            : Set as : $Date
    Local    : Field    : Max_PL_VchNo                : Set as : $Vouchernumber
    Local    : Field    : Max_PL_PartyName            : Set as : $PartyLedgerName
    Local    : Field    : Max_PL_MobNo                : Set as : $LedgerMobile:Ledger:$PartyLedgerName
    Local    : Field    : Max_PL_EmailId             : Set as : $EMail:ledger:$PartyLedgerName
    Local    : Field    : Max_PL_AmcPeriod           : Set as : $STVchAmcPer        
    Local    : Field    : Max_PL_From                  : Set as : $STVchAmcFrom    
    Local    : Field    : Max_PL_To                 : Set as : $STVchAmcTo        
    Local    : Field    : Max_PL_Duedarte              : Set as : $STVchAmcnext    
    Local    : Field    : Max_PL_Amount               : Set as : $STVchAmcAmount    
    Local    : Field    : Max_PL_BillAmount            : Set as: $Amount
    local    : Field    : Max_PL_AMCName            : Set as: $vchamc;if $CollInvAmt=$STVchAmcAmount then "Actual Amc" else "Free Amc"
    Local    : Field        : Default        : Style  : nORMAL
    Explode    : InventoryExplodeLevel1    : Yes
    
    Option      : AlterVchOnEnterTallyAccess     : ##VarAlterVchTallyAlter


    [Part    : InventoryExplodeLevel1]
    Line    : InventoryExplodeLevel1
    Repeat    : InventoryExplodeLevel1    : eXPLODECollForWarrenty1
    Scroll    : Vertical
    Float    : No
    
    
[Line    : InventoryExplodeLevel1]
    Field    : Max_PL_VchDate,Max_PL_VchNo,Max_PL_PartyGroupName,Max_PL_PartyName,Max_PL_Address,Max_PL_Consignee,Max_PL_ConsigneeAddress, +
                Max_PL_MobNo,Max_PL_PhoneNo,Max_PL_EmailId,
                
    Right Field    : Max_PL_From,Max_PL_To,Max_PL_Duedarte,Max_PL_Amount,Max_PL_BillAmount,Max_PL_AMCName
    


    Local    : Field    : Max_PL_PartyGroupName        : Set as : ""
    Local    : Field    : Max_PL_Address            : Set as : ""
    Local    : Field    : Max_PL_Consignee            : Set as : ""
    Local    : Field    : Max_PL_ConsigneeAddress   : Set as : ""
    Local    : Field    : Max_PL_PhoneNo             : Set as : ""
                                                           
    Local    : Field    : Max_PL_VchDate            : Set as : ""
    Local    : Field    : Max_PL_VchNo                : Set as : ""
    Local    : Field    : Max_PL_PartyName            : Set as : $StockItemName
    Local    : Field    : Max_PL_PartyName            : Space Left    : 10 MMS
    Local    : Field    : Max_PL_MobNo                : Set as : $rATE
    Local    : Field    : Max_PL_EmailId             : Set as : ""
    Local    : Field    : Max_PL_AmcPeriod           : Set as : ""
    Local    : Field    : Max_PL_From                  : Set as : ""
    Local    : Field    : Max_PL_To                 : Set as : ""
    Local    : Field    : Max_PL_Duedarte              : Set as : ""
    Local    : Field    : Max_PL_Amount               : Set as : $AMOUNT
    Local    : Field        : Default        : Style  : nORMAL










[Collection    : eXPLODECollForWarrenty1]
    Source Collection    : REPORTSALESCOLLECTION;CollForWarrenty
    Walk                : Inventory Entries
    Fetch                : StockItemName,rATE,AMOUNT
    Compute                : VoucherNumber1    : $VoucherNumber
    ;Filter                : vCHnOfILTWER



[!Line: AlterVchOnEnterTallyAccess]
    Key     : AlterVchOnEnterTallyAccessKey

[Key:     AlterVchOnEnterTallyAccessKey]
    Key      : Enter
    Action   : Alter : AlterVchOnEnterTalyKeyAlter
    Mode     : Display
 
[Report: AlterVchOnEnterTalyKeyAlter]
    Use     : Voucher
    Form    : Voucher
    Object  : Voucher : #DSPVchMasterIDNoTally13

[Field: DSPVchMasterIDNoTally13]
   Use         : Name Field
   Set as      : $$SPrintF:@@VCHMasterID:$MasterID
   Variable    : VarAlterVchTallyAlter
   Invisible   : Yes
   Alter       : Voucher
   Modifies       : VarAlterVchTallyAlter : Yes

[Variable: VarAlterVchTallyAlter]
    Type        : Logical

[System: Variable]
    VarAlterVchTallyAlter    : No





[Collection    : REPORTSALESCOLLECTION]
    Type        : Vouchers    : VoucherType
    Child Of    : $$VchTypeSales
    Belongs To    : Yes
    Fetch        : Date,VoucherNumber,AMOUNT,COSTCENTRENAME,PartyLedgerName,Vouchertypename,BasicBuyerName
Fetch        : STVchAmcPer,EiAmcYesNo        
Fetch        : STVchAmcFrom    
Fetch        : STVchAmcTo        
Fetch        : STVchAmcnext    
Fetch        : STVchAmcAmount    ,vchamc
Compute        : CollInvAmt            : $$CollAmtTotal:InventoryEntries:$Amount
;Filter    : FilterPartyName,;
Filter    : DateperFilter1,AmcCollFilter

[System    : Formulae]
    AmcCollFilter    : $EiAmcYesNo="AMC"
    



[System    : Formulae]
    FilterPartyName        : If Not ##JFilterAMCType = $$SysName:AllItems Then $vchamc = ##JFilterAMCType Else 1=1
    
    DateperFilter1        : If ##SetNFPeriodFrom1 = "" And ##SetNFPeriodTo1 = "" Then 1=1 Else $STVchAmcnext Between ##SetNFPeriodFrom1  And ##SetNFPeriodTo1
    


;--------------------Party Name wise Filter

[Button:  AMCTypeButton]
    Key     :  F1
    Title   : $$LocaleString:"AMC Name"
    Action  : Execute : AMCTypeSearch
    
[Report : AMCTypeSearch]
    Dynamic     : Yes
    Form        : AMCTypeSearch
    variable    : JFilterAMCType

[Form: AMCTypeSearch]
    Part        : AMCTypeSearch
    Full Width  : No
    Space Left  : 1
    Space Right : 1
    Space Top   : 1
    Space Bottom: 1
    Back ground : Light Sea Green

[Part: AMCTypeSearch]
    Lines       : Form SubTitle,AMCTypeSearch
    Local       : Field : Form SubTitle : Info : "AMC Name Search"
    Local       : Field : Form SubTitle : Width: 20% Screen
    Local       : Field : Form SubTitle : Color    : Red

[Line: AMCTypeSearch]
    Fields      : Short Prompt,AMCTypeSearch
    Local       : Field : Short Prompt : Set as : "AMC Name :"
    Local       : Field : Short Prompt : Style    : Normal Bold
     Local       : Field : Short Prompt : Style    : Normal Bold
    Local       : Field : Short Prompt : Width: 20% Screen
    Local       : Field : Short Prompt : Color    : Blue


[Field: AMCTypeSearch]
    Use         :  name Field
    Set as        : ##JFilterAMCType
    Set Always    : Yes   
    Table        : CollLedger  ,AllItems
    Show Table  : Always
    Variable    : JFilterAMCType
    Modifies    : JFilterAMCType

[System : Variable]
    JFilterAMCType    : ""

[Variable : JFilterAMCType]
    Type            : String
    Persistent         : Yes

    
 [Collection    : CollLedger]
     Title         : "List Of AMC"
      List Name   : $$LocaleString:"Actual Amc", $$LocaleString:"Free Amc"
    Title       : $$LocaleString:"Actual Amc / Free Amc"
    Format      : $Name,10
    Client Only : Yes




;=======================

; DUEDATEButton JFilterDUEDATE
[Button:  DUEDATEButton]
    Key     : F6
    Title   : $$LocaleString:"Due Only Filter"
    Action  : Execute : NFDPeriod1

[Report    : NFDPeriod1]
    Title   : $$LocaleString:"Due Only Filter"
    Form    : NFDPeriod1

[Form: NFDPeriod1]

    Part        : NFDPeriod1
    Width        : 20% screen
    No Confirm  : Yes
    Space Left  : 1
    Space Right : 1
    Space Top   : 1
    Space Bottom: 1
    Background    : white

    [Part: NFDPeriod1]

        Lines       : Form SubTitle, NFDPeriodFrom1, NFDPeriodTo1
        Local       : Field : Form SubTitle : Info : $$LocaleString:"CHANGE PERIOD"
        Local       : Field : Form SubTitle : Color    : RED

        [Line: NFDPeriodFrom1]
            Fields      : Short Prompt, NFDPeriodFrom1
            
            Local    : Field    : ShortPrompt        : Info        : $$LocaleString:"From : "
            Local       : Field :ShortPrompt : Color    : blue
            Space Bottom    : 1 mms
            
            [Field: NFDPeriodFrom1]
                Use         : ShortDateField
            ;    Set as        : ""
                Width    : 10% screen
                Modifies    : SetNFPeriodFrom1    ;: Yes
                Variable    : SetNFPeriodFrom1

        [Line    : NFDPeriodTo1]
            Fields      : ShortPrompt, NFDPeriodTo1
            
            Local    : Field    : ShortPrompt        : Info        : $$LocaleString:"To : "
            Local       : Field :ShortPrompt : Color    : blue

            [Field: NFDPeriodTo1]
                Use         : ShortDateField
            ;    Set as        : ""
            Width    : 10% screen
                Modifies    : SetNFPeriodTo1    ;: Yes
                Variable    : SetNFPeriodTo1
                Valid:$$IsEmpty:$$Value OR $$Value >= #NFDPeriodFrom1

[Variable    : SetNFPeriodFrom1]
    Type        : Date
    
[Variable    : SetNFPeriodTo1]
    Type        : Date

[System    : Variables]
    SetNFPeriodFrom1    : "";##SvCurrentdate
    SetNFPeriodTo1        : "";##SvCurrentdate
















[Field : Max_PL_PartyGroupName]
    Use        : name fied
    Width    : 10% screen
    Invisible: not ##SSParent
    

[Field : Max_PL_Address]
    Use        : name fied
    Width    : 20% screen
    Line    : 0
    Invisible: not ##SSAddress

[Field : Max_PL_Consignee]
    Use        : name fied
    Width    : 10% screen
    Invisible: not ##varConsignee

[Field : Max_PL_ConsigneeAddress]
    Use        : name fied
    Width    : 20% screen
    Line    : 0
    Invisible: not ##varConsigneeAddress
    
[Field : Max_PL_PhoneNo]
    Use        : name fied
    Width    : 10% screen
    Invisible: not ##SSPhoneNo




[Field    : Max_PL_VchDate      ]
    Use        : Uni date fied
    Width    : 10% screen
    
[Field    : Max_PL_VchNo    ]
    Use        : name fied
    Width    : 10% screen

[Field    : Max_PL_PartyName    ]
    Use        : name field
    Full Width    : Yes
    
[Field    : Max_PL_MobNo      ]
    Use        : name fied
    Width    : 15% screen
    Invisible: not ##SSMobile
    
[Field    : Max_PL_EmailId    ]
    Use        : name fied
    Width    : 20% screen
    Invisible: not ##SSEmail
    
[Field    : Max_PL_AmcPeriod  ]
    Use        : name fied
    Width    : 15% screen
    
[Field    : Max_PL_From       ]
    Use        : Short Date fied
    Width    : 10% screen
    
[Field    : Max_PL_To         ]
    Use        : Short Date fied
    Width    : 10% screen
    
[Field    : Max_PL_Duedarte   ]
    Use        : Short Date fied
    Width    : 10% screen
    
[Field    : Max_PL_Amount     ]
    Use        : amount fied
    Width    : 12% screen
    Align    : Right
    
    [Field    : Max_PL_BillAmount     ]
    Use        : amount fied
    Width    : 12% screen
    Align    : Right

[Field    : Max_PL_AMCName]

    Use        : name fied
    Width    : 10% screen
    Invisible: Yes
    
;===================================   Regilur Bill Voucher Print Level


 [#Form: Comprehensive Invoice]
    
    

 [#Part: EXPINV LeftSign]
     Option        : optLeftSign        : @@issales and ##VarPrintAMC="Yes"
    
[!Part    : optLeftSign]
     Add        : Bottom Part    : before     : EXPINV Narration    : Max_ExpinvAmcDtls
           




[Part    : Max_ExpinvAmcDtls]
    Line    : Max_ExpinvAmcLn1,VchAmcFrom,VchAmcNext
    Border    : thin box
[Line    : Max_ExpinvAmcLn1]
    Field    : Medium Prompt,VchAmcPer
    
    Local    : Field    :  Medium Prompt    : Info    : if  @@UDFAmcVoucherYesNo then "AMC Type :" else "Warranty Type :"
    Local    : Field    :  Medium Prompt    : Width    : 35 mms




;======================== Alt +p F12 (sales)

;;;Sales
[#Part: VchF12PrnSTDConfig SalesInvoiceLeft]
    Option    : Salesoptprintwarty    : @@issales
    
[!Part    : Salesoptprintwarty]
    Add    : Line    : After        : SASimple :  Max_AM_PrintAMCDtls;,Max__ConfPartyPrevBal
    
[Line:  Max_AM_PrintAMCDtls]
    Field        : Medium Prompt, Logical Field
    Local        : Field    : Medium Prompt : Info      : $$LocaleString:"Print Warrenty/AMC Details ?"
    Local        : Field    : Medium Prompt : Color        : Blue
    Local        : Field    : Logical Field : Modifies  : VarPrintAMC
    

[Variable: VarPrintAMC]
    Persistent  : Yes
    Type        : Logical

    
[System: Variables]
    VarPrintAMC : No