Barcode Print A4 Size But Not Skip Formula Found Pls Help Me In My Code

Discussion in 'General Discussions' started by Amit Dahiwade, Oct 6, 2021.

    
  1. Amit Dahiwade

    Amit Dahiwade New Member


    Respected Sir/Madam

    This Is Barcode Tdl
    I want in This tdl Print Barcode Label Start From Button.
    For Example 1st Purchase Invoice I Have 2 Stock Item Quantity Is 13 & 2nd Purchase Invoice 5 Stock Item Quantity Is 23.
    I want Total Both Purchase Quantity In Single A4 Size Sticker Paper

    Ex. In Single A4 Sticker Paper Size 4 Columns We Have And 10 Rows So Total Sticker Quantity Is 40
    So I want 1st Purchase Sticker Start From 1st Sticker and Print 13 Quantity and Next 2ns Purchase Sticker Print Start From 14
    I want To Skeep all 13 already Print

    I send Youtube Link for
    For Understand My Requirement
    I need For Don't Waste Paper Requirement


    Code Is Here




    [Collection: Stock Alieas Collection]

    Type : STOCK ITEM
    Fetch : Name

    [Collection: Stock Alieas NameCollection]

    Source Collection : Stock Alieas Collection
    Walk : LANGUAGE NAME, NAME
    Fetch : Name

    [Collection:vch]

    Type:Voucher
    ;Fetch:StockItemName
    ;select $StockItemName from vch

    [Collection: vch1]

    Source Collection:Default;vch
    Walk:All Inventory Entries
    Fetch:StockItemName,Rate,Amount
    By: StockItemName:$StockItemName

    ;select $StockItemName,$Rate from vch1

    [System: UDF]

    BarcodeMrpUDF : Amount : 1001

    [System: Variable]

    LIST VARIABLE : StkName : String
    List Variable : StkAlias : String
    list variable : StkMrp : Amount



    ;; Function to replace space with "="


    [Function: TSPL FFE BarcodeString]

    Parameter : TSPLFFEEBarcodeInput : String

    Variable : TSPLFFE Temp : String
    Variable : TSPLFFE Count : Number
    Variable : TSPLFFEEBarcodeOutput : String

    10 : Set : TSPLFFE Temp : ""
    20 : FOR TOKEN : TSPL TokenVar : ##TSPLFFEEBarcodeInput : " "
    30 : Set : TSPLFFE Temp : ##TSPLFFETemp + $$String:##TSPLTokenVar + "="
    40 : END FOR
    50 : SET : TSPLFFE Count : $$StringLength:##TSPLFFETemp
    60 : SET : TSPLFFEEBarcodeOutput : $$StringPart:##TSPLFFETemp:0:(##TSPLFFECount-1)
    70 : RETURN : ##TSPLFFEEBarcodeOutput


    ;[#Part: STKI Basic Features]

    ; Add : Parts : After : STKI Units : STKI MRP

    ;[Part: STKI MRP]

    ; Lines : STKI MRPTitle

    ; [Line: STKI MRPTitle]

    ; Fields : Short Prompt, STKI MRPEntery
    ; Local : Field : Short Prompt : Info : $$LocaleString:"MRP"
    ; Local : Field : Short Prompt : Width : @@ShortNameWidth
    ; Space Top : 0.5

    ; [Field: STKI MRPEntery]

    ; Use : Amount Field
    ; Storage : BarcodeMrpUDF
    ; Set Always : Yes




    ;A Button is added in Purchase voucher, you can print the barcode along with item qty.


    [#Part : VTYP BehaviourMain]

    Add : Line : After : VTYP PrintSave :Enable Barcode Module

    [Line : Enable Barcode Module]

    Field : Enable Barcode Module Title,Enable Barcode Module


    [Field : Enable Barcode Module Title]

    Use : Long Prompt
    Set as : "Enable Barcode Module ??"
    Width : @@LongWidth -1


    [Field : Enable Barcode Module]

    Use : logical Field
    Set as : No
    Storage : EnableBarcode


    [System: Formulae]

    EnableBarcode: $EnableBarcode:Vouchertype:##SVVouchertype

    [System : UDF]


    EnableBarcode : Logical : 21005



    [#Form: Purchase Color]

    ; Add : Button : Barcode Button
    ;Option : PurcOrder Color Bar: @@EnableBarCode
    Option : Purchase Color : @@EnableBarCode
    On : Form Accept:Yes:Call:Barcode Print Function
    Button: Barcode Button

    [#Form: Sales Color]

    Add : Button : Barcode Button



    [Button: Barcode Button]

    Title : "Print Barcode"
    Key : Alt+F
    Action : Call : Barcode Print Function

    [Function: Barcode Print Function]

    Variable : Counter : Number : 0
    Variable : KeyVar : Number : 1
    Variable : VarBilledQty : Number
    Variable : VarStkName : String
    Variable : VarMrp : Amount
    Variable : VarAlias : String

    00a : LIST DELETE : StkName
    00b : List Delete : StkAlias
    00c : List Delete : StkMrp
    00 : Walk : Inventory Entries
    01 : SET : VarBilledQty : ($$Number:$BilledQty)
    02 : SET : VarStkName : $StockItemName
    02a : Set : VarMrp : $(StockItem,$StockItemName).BarcodeMrpUDF
    02b : Set : VarAlias : $(StockItem,$StockItemName).PartNo
    02c : Log:##VarMrp
    03 : While : ##Counter < ##VarBilledQty
    04 : LISTADD : StkName : ##KeyVar : ##VarStkName
    05 : ListAdd : StkAlias : ##KeyVar : ##VarAlias; : StkAlias
    05a: ListAdd : StkMrp : ##KeyVar : ##VarMrp; : amount
    06 : LOG : ##KeyVar
    ; 07 : LOG : ##VarStkName
    07a: LOG : ##VarAlias
    07b: LOG : ##VarMrp
    08 : INCREMENT : Counter
    09 : INCREMENT : KeyVar
    10 : End While
    11 : SET : Counter : 0
    12 : End Walk
    13 : PRINT : Barcode Invoice




    [Report: Barcode Invoice]

    Form : Barcode Invoice
    Object : Voucher

    [Form: Barcode Invoice]

    Part : Barcode Part

    [Part: Barcode Part]

    Line : Barcode Details Line
    Repeat : Barcode Details Line; : vch1
    Set : $$Roundup:(($$ListCount:StkName)/5):1
    ;Set : $$Roundup:(($$ListCount:StkAlias)/3):1
    Scroll : Vertical
    Space Bottom : 4.5 mms
    Space Top : 4.5 mms

    [Line: Barcode Details Line]

    Lines : Barcode ItemDetail Line, Barcode Line ;,Barcode Line
    ;Space Bottom:0.15 inch

    [Line: Barcode ItemDetail Line]

    Field: Barcode ItemDetails1, Barcode ItemDetails2, Barcode ItemDetails3, fld4, fld5


    [Field:Barcode ItemDetails1]

    Use : Name Field
    Set as : ##StkName[@@FirstIndex]; + ##StkMstrMRP[@@FirstIndex]
    ;Width:1 inch
    Full Width :Yes
    Align : Center
    Style : ACBCode6


    [Field:Barcode ItemDetails2]

    Use : Name Field
    Set as : ##StkName[@@SecondIndex]; + ##StkMstrMRP[@@SecondIndex]
    Full Width :Yes
    Align : Center
    Style : ACBCode6



    [Field:Barcode ItemDetails3]


    Use : Name Field
    Set as : ##StkName[@@ThirdIndex]; + ##StkMstrMRP[@@ThirdIndex]
    ;Width:1 inch
    Full Width :Yes
    Align : Center
    Style : ACBCode6


    [Field:fld4]

    Use : Name Field
    Set as : ##StkName[@@FourthIndex]; + ##StkMstrMRP[@@ThirdIndex]
    ;Width:1 inch
    Full Width:yes
    Align : Center
    Style : ACBCode6

    [Field:fld5]

    Use : Name Field
    Set as : ##StkName[@@FifthIndex]; + ##StkMstrMRP[@@ThirdIndex]
    ;Width:1 inch
    Full Width:yes
    Align : Center
    Style : ACBCode6



    [Line: Barcode Line]

    Field : Barcode Field1, Barcode Field2, Barcode Field3, fldn4, fldn5
    Space Bottom : 4.9 mms


    [Field: Barcode Field1]

    Use : Name Field
    Set as : "(" + ##StkAlias[@@FirstIndex] + ")";$$CollectionField:$NAME:2:StockAlieasNameCollection
    Style : TSPL FFE BarCode
    Full Width :Yes
    Align : Center

    [Field: Barcode Field2]

    Use : Name Field
    Set as : "(" + ##StkAlias[@@SecondIndex] + ")";$$CollectionField:$NAME:2:StockAlieasNameCollection
    Style : TSPL FFE BarCode
    Full Width :Yes
    Align : Center

    [Field: Barcode Field3]

    Use : Name Field
    Set as : "(" + ##StkAlias[@@ThirdIndex] + ")";$$CollectionField:$NAME:2:StockAlieasNameCollection
    Style : TSPL FFE BarCode
    Full Width :Yes
    Align : Center

    [Field: fldn4]
    Use : Name Field
    Set as : "(" + ##StkAlias[@@FourthIndex] + ")";$$CollectionField:$NAME:2:StockAlieasNameCollection
    Style : TSPL FFE BarCode
    Full Width:Yes
    Align :Center

    [Field: fldn5]
    Use : Name Field
    Set as : "(" + ##StkAlias[@@FifthIndex] + ")";$$CollectionField:$NAME:2:StockAlieasNameCollection
    Style : TSPL FFE BarCode
    Full Width:Yes
    Align :Center


    [System: Formula]

    FirstIndex : ($$Line*5)-4
    SecondIndex : ($$Line*5)-3
    ThirdIndex : ($$Line*5)-2
    FourthIndex : ($$Line*5)-1
    FifthIndex : ($$Line*5)



    [Style: TSPL FFE BarCode]

    Font : IDAutomationHC39S
    Height : 8

    [#Object: StockItem]

    TSPLFEEStkAlias : $$Alias


    ;; End-of-File

    [#Field: VCH NrmlBilledQty]

    Option : VCHNrmlBilledQtyDealer :mad:@IsSales; and @@EnableBarCol; and @@EnableBarCodeModule

    [!Field:VCHNrmlBilledQtyDealer]

    Delete : Skip
    Skip Forward : Yes
    ;Set as : $$AsQty:10
    Set By Condition : ($$IsEmpty:$$Value) : 1
    Set Always : Yes
    Delete : Set as


    [#Field: VCH Discount]

    Option : Discount :mad:@IsSales ;and @@EnableBarCol ; and @@EnableBarCodeModule

    [!Field:Discount]

    Set Always : Yes
    Skip Forward :Yes

    [#Field: VCH NrmlRate]


    Option : VCHNrmlRateDealer :mad:@IsSales ;and @@EnableBarCol ; and @@EnableBarCodeModule

    [!Field:VCHNrmlRateDealer]

    Skip : $$IsEndOfList:#IE_IMEINo
    Add : Set By Condition : At Beginning:(!$$IsEmpty:$InclusiveTaxValue):$$InclusiveTaxValue:mad:@ExItemRate:mad:@STItemRate:mad:@VATItemRate:mad:@TCSItemRate:mad:@GSTItemRate:mad:@GSTItemQtyRate:mad:@ExItemMRPDutyValue:mad:@VATItemMRPDutyValue:mad:@ExItemQuantum
    ;On : Accept : Yes : Field Accept
    ;On : Accept : Yes : Set Object Values : BatchAllocations[1].ActualQty : $$AsQty:1
    Skip Forward:Yes

    [#Field :VCHValue]

    Option :VCHValueDealer : @@IsSales ;and @@EnableBarCol ; and @@EnableBarCodeModule

    [!Field:VCHValueDealer]

    Set By Condition : Not ($$IsEndOfList:#IE_IMEINo) :($Rate * $BilledQty)
    Set Always : Yes
    Skip Forward : Yes


    [#Field: VCH RateUnit]
    Option :VCHValueDealer1 : @@IsSales ;and @@EnableBarCol ; and @@EnableBarCodeModule

    [!Field:VCHValueDealer1]

    ;Set By Condition : Not ($$IsEndOfList:#IE_IMEINo) :($Rate * $BilledQty)
    Set Always : Yes
    Skip Forward : Yes

    [#Field: VCH RateIncl]

    Option : VCHRateInclDealer :mad:@IsSales; and @@EnableBarCol ; and @@EnableBarCodeModule

    [!Field:VCHRateInclDealer]


    ;Add : Set By Condition : At End:(!$$IsEmpty:mad:TableValue) : $$AsRate:mad:TableValue
    ;TableValue : $$Table:IE_IMEINo:$SellingPrice1
    Set Always : Yes
    Skip Forward: Yes



    ;;Subform ----Label start from
     



  2. Mail me at tech4vishal@gmail.com
     


  3. SINTO PARAVA

    SINTO PARAVA Member


    try like this


    [Function:count_func_test]
    Parameter:count_from:Number
    Parameter:count_to:Number
    Variable:counter:Number
    01:Set:counter:##count_from
    03:While:##counter <= ##count_to
    04 : Walk Collection : your_collection
    05 : Do If:($$Number:$fromcount = ##counter):Call:barcode_print;;:##pdate:##pvtype:##pnaration

    06:End Walk
    07:Increment:counter
    08: End While
    ; 16: Msg Box : "Status" : "barcode Print Successfully"


    [Collection:your_collection]
    Object:count1

    [Object:count1]
    fromcount:10
    tocount:100
     


Share This Page