Purchase details against sales based on batch number

Discussion in 'Free Source Codes' started by farrakh hayat, Sep 25, 2020.

    
  1. farrakh hayat

    farrakh hayat Member


    Hi Sir,
    I am new.
    I need help from Experts.

    I have crated a sales details having voucher date, voucher number, Item, Party and batch.
    I want to show purchase details (purchase voucher number and date) against batch number of sales voucher in the right side of this report.
    My report is showing sales and purchase in same column.

    Please help me to correct the code.
    Thnx.

    [#Menu : FarrakhG Reports]
    Title :Farrakh Reports"
    Add : Item : GD Prints : Display : GD Print

    [Report :GD Print]
    Form :GD Print
    Variable : SVFromDate,SVToDate
    Set : SVFromDate : $$MonthStart:##SVCurrentDate

    [Form :GD Print
    Part : MyGDReportTitle,GD PrintTL,GD Print
    Button : Change Period,Print Button,Export Button
    Bottom Part : GD PrintBTM
    Background : @@SV_UNYELLOW

    [Part : MyGDReportTitle]

    Line :MyGDReportTitle
    [Line :MyGDReportTitle]

    Field : Simple Field
    Local : Field : Simple Field : Set As : "GD Prints from " + $$String:##SVFromDate +" to " + $$String:##SVToDate
    Local : Field : Simple Field : Style : Normal Bold

    [Part : GD PrintTL]
    Use : GD Print
    Delete : Repeat
    Delete : Scroll
    Border : ColumnTitles
    Local : Field : Default : Type : string
    ;; Sales Side
    Local : Field : MyGDPrintSVdate : Set As : "Sale Date"
    Local : Field : MyGDPrintSParty : Set As : "Customer"
    Local : Field : My GDPrintSItem : Set As : "Item Name"
    Local : Field : MyGDPrintSVchNo : Set As : "Sales Vch No"
    Local : Field : MyGDPrintSBatch : Set As : "Sales Batch"
    ;; Purchase Side
    Local : Field : MyGDPrintPVch : Set As : "Purchase Vch No"
    Local : Field : MyGDPrintPVch : Set As : "Purchase Vch No"


    Local :Field : Default : Style : Small Bold

    [Part :GD Print]
    Line : GD Print
    Repeat : GD Print :MyGDPrintItems
    Scroll : Vertical
    Total : ""

    [Line :GD Print]
    Left Field : MyGDPrintSVdate, MyGDPrintSVchNo, MyGDPrintSParty, My GDPrintSItem, MyGDPrintSBatch, MyGDPrintPVch
    Border : Thin bottom
    [Field: MyGDPrintSVdate]
    Use : Short Date Field
    Set : $SvchDate
    Style : Small
    Alignment : Left
    Width : 10
    [Field : MyGDPrintSVchNo ]
    Use : Short Name Field
    Set As : $SVchNum
    Style : Small
    Alignment : Left
    Width : 15
    [Field : MyGDPrintSParty ]
    Use : Name Field
    Set As : $SParty
    Style : Small
    Alignment : Left
    Width : 50
    [Field : My GDPrintSItem]
    Set As : $SvchStockitem
    Style : Small
    Display : Item Monthly Summary
    Variable : StockitemName
    Alignment : Left
    Width : 50
    [Field : MyGDPrintSBatch ]
    Use : Short Name Field
    Set As : $SvchBatchName
    Style : Small
    Alignment : Cetnre
    Width : 15
    [Field : MyGDPrintPVch ]
    Use : Short Name Field
    Set As : If $$IsSysName:$SVchNum Then "" Else $PVchNum
    Style : Small
    Alignment : Cetnre
    Width : 15
    [Part : GD PrintBTM]
    Use : GD Print
    Delete : Repeat
    Delete : Scroll
    Delete : Total
    Border : Totals
    Local : Field : My GDPrintSItem : Set As : "Total"
    Local :Field : Default : Style : Small Bold
    [Collection : MySVchCollection]
    Type : Vouchers : VoucherType
    Child of : $$VchTypeSales
    Belongs to : yes
    [Collection : MyPVchCollection]
    Type : Vouchers : VoucherType
    Child of : $$VchTypePurchase
    Belongs to : yes

    [Collection : MyGDPrintItems]
    Source Collection : MySVchCollection, MyPVchCollection

    Walk : Inventory Entries, BATCHALLOCATIONS , ALLLEDGERENTRIES, INVENTORYALLOCATIONS,
    ;;Sales Side
    By : SVchBatchName : $BatchName
    Method : SVchDate : $Date
    Method : SVchNum : $VoucherNumber
    Method : SVchStockitem : $StockitemName
    Method : Sparty : $PartyLedgerName
    ;;Purchase Side
    Method : PVchNum : $VoucherNumber
    Is ODBC Table:Yes?
     
    Last edited: Sep 29, 2020


  2. farrakh hayat

    farrakh hayat Member


    please help
     


  3. farrakh hayat

    farrakh hayat Member


    please help
     


Share This Page