Logo SQL Reports and Tools

repository·master·Indexed 42 days ago

https://github.com/ugurozpinar/logo

A collection of specialized SQL reports and utilities for Logo software users (Tiger 3, Tiger 3 Enterprise, Go 3). Includes custom queries for stock, accounting, banking, and payroll, as well as tools for E-Defter XML to PDF conversion, debt aging reports, and foreign currency balance tracking via interface adaptation and database triggers.

Tokens
289.6K
Snippets
443
Records
707
Agent score
53%

What's inside Logo

  1. Available Logo Tiger Enterprise Reports

    master

    This repository provides specialized SQL reports for Logo Tiger Enterprise and related products. Key available reports include:

    • Lot and Warehouse Based Stock Report: Specialized report for Tiger Enterprise.
    • Checks Report (Çekler Raporu): Accounting report for managing checks.
    • Aging Report from Accounting Vouchers (Muhasebe Fiş Hareketlerinden Yaşlandırma Raporu): Debt aging analysis.
    • Detailed Invoice Line Report (Faturalar Satır Detaylı): Detailed breakdown of invoice lines including VAT information.
  2. Understand LG_SLQCASGN table relations

    master

    The LG_SLQCASGN table relates to several other tables in the Logo database depending on the ASGNTYPE. Use these relations to join QC data with items, vouchers, or stock movements.

    Key Relations

    Source FieldDestination TableDestination FieldCondition / Context
    ITEMREFLG_ITEMSLOGICALREFWhen ASGNTYPE=1 (Material)
    ITEMREFLG_OPERTIONLOGICALREFWhen ASGNTYPE=2 (Operation)
    FICHEREFLG_STFICHELOGICALREFWhen ASGNTYPE=1 (Material)
    FICHEREFLG_PRODORDLOGICALREFWhen ASGNTYPE=2 (Operation)
    STTRANSREFLG_STLINELOGICALREFWhen ASGNTYPE=1 (Material)
    STTRANSREFLG_DISPLINELOGICALREFWhen ASGNTYPE=2 (Operation)
    SLTRANSREFLG_SLTRANSLOGICALREFGeneral Lot/Serial/Location relation
    QCSETREFLG_QCSETLOGICALREFInspection Set relation
    QCVALREFL_QCLVALLOGICALREFInspection Value relation
    QCASGNLOGICREFL_QASGNLOGICALREFInspection Assignment relation
  3. Understand LG_SLTRANS table relations

    master

    The LG_SLTRANS table acts as a central link between material movements and specific lot/serial identifiers. Use the following foreign key relationships to join data:

    Source FieldDestination TableDestination FieldRelation Type
    STFICHEREFLG_STFICHELOGICALREFone-to-one
    STTRANSREFLG_STLINELOGICALREFone-to-one
    INTRANSREFLG_STLINELOGICALREFone-to-one
    INSLTRANSREFLG_SLTRANSLOGICALREFone-to-one
    ITEMREFLG_ITEMSLOGICALREFone-to-one
    SLREFLG_SERILOTNLOGICALREFone-to-one
    LOCREFLG_LOCATIONLOGICALREFone-to-one
    UOMREFLG_UNITSETLLOGICALREFone-to-one
    SOURCEWSREFLG_WORKSTATLOGICALREFone-to-one
    DISTORDREFLG_DISTORDLOGICALREFone-to-one
    DISTORDLNREFLG_DISTORDLINELOGICALREFone-to-one
  4. Join LG_SLSCLREL with Salesman and Client tables

    master

    To retrieve full details for a sales representative or a client associated with a relation, join LG_SLSCLREL using the following foreign key relationships:

    • Sales Representative: Join LG_SLSCLREL.LOGICALREF to L_SLSMAN.LOGICALREF (one-to-one).
    • Client/Account: Join LG_SLSCLREL.LOGICALREF to L_CLCARD.LOGICALREF (one-to-one).
    -- Example Join Concept
    SELECT 
        rel.LOGICALREF, 
        sman.NAME as SalesmanName, 
        cl.DEFINITION as ClientName
    FROM LG_SLSCLREL rel
    INNER JOIN L_SLSMAN sman ON rel.LOGICALREF = sman.LOGICALREF
    INNER JOIN L_CLCARD cl ON rel.LOGICALREF = cl.LOGICALREF;
  5. Understand LG_ITMFACTP relations

    master

    The LG_ITMFACTP table has a one-to-one relationship with the LG_ITEMS table. You can link item-specific plant information to the main item card using the ITEMREF field, which maps to LOGICALREF in LG_ITEMS.

    | Level|Product ID|Resource ID|Special Code|Source Field|Destination Table|Destination Field|Relation Type|Extra Condition|
    |-----|-----|-----|-----|-----|-----|-----|-----|-----|
    |1|3|889||ITEMREF|[L_ITEMS](../LG_ITEMS "L_ITEMS")|LOGICALREF|one-to-one|
  6. Join L_DEMANDPEGGING with related tables

    master

    To build complete reports from L_DEMANDPEGGING, use the following foreign key relationships:

    • Demand Line Details: Join DEMANDLINEREF to LG_DEMANDLINE.LOGICALREF (one-to-one).
    • Demand Fiche Details: Join DEMANDFICHEREF to L_DEMANDFICHE.LOGICALREF (one-to-one).
    • MRP Head Details: Join PARENTREF to LG_MRPHEAD.LOGICALREF (one-to-one).
    • Project Details: Join PROJECTREF to L_PROJECT.LOGICALREF (one-to-one).
    | Source Field | Destination Table | Destination Field | Relation Type |
    | :--- | :--- | :--- | :--- |
    | DEMANDLINEREF | [L_DEMANDLINE](../LG_DEMANDLINE "L_DEMANDLINE") | LOGICALREF | one-to-one |
    | DEMANDFICHEREF | [L_DEMANDFICHE](../L_DEMANDFICHE "L_DEMANDFICHE") | LOGICALREF | one-to-one |
    | PARENTREF | [L_MRPHEAD](../LG_MRPHEAD "L_MRPHEAD") | LOGICALREF | one-to-one |
    | PROJECTREF | [L_PROJECT](../L_PROJECT "L_PROJECT") | LOGICALREF | one-to-one |
  7. Understand LG_DISTVEHICLE relations to LG_UNITSETL

    master

    The LG_DISTVEHICLE table maintains one-to-one relationships with the LG_UNITSETL table for various measurement units. This allows you to resolve the actual unit of measure for physical dimensions.

    Use the following reference fields in LG_DISTVEHICLE to join with LG_UNITSETL.LOGICALREF:

    • WIDTHREF (Width)
    • LENGTHREF (Length)
    • HEIGHTREF (Height)
    • AREAREF (Area)
    • VOLUMEREF (Volume)
    • WEIGHTREF (Weight)
    |Source Field|Destination Table|Destination Field|Relation Type|
    |---|---|---|---|
    |WIDTHREF|[L_UNITSETL](../LG_UNITSETL "L_UNITSETL")|LOGICALREF|one-to-one|
    |LENGTHREF|[L_UNITSETL](../LG_UNITSETL "L_UNITSETL")|LOGICALREF|one-to-one|
    |HEIGHTREF|[L_UNITSETL](../LG_UNITSETL "L_UNITSETL")|LOGICALREF|one-to-one|
    |AREAREF|[L_UNITSETL](../LG_UNITSETL "L_UNITSETL")|LOGICALREF|one-to-one|
    |VOLUMEREF|[L_UNITSETL](../LG_UNITSETL "L_UNITSETL")|LOGICALREF|one-to-one|
    |WEIGHTREF|[L_UNITSETL](../LG_UNITSETL "L_UNITSETL")|LOGICALREF|one-to-one|
  8. Understand LG_WSCHVAL relations

    master

    The LG_WSCHVAL table has a one-to-one relationship with the L_WSCHCODE table. You can join these tables using the CHARCODEREF field from LG_WSCHVAL to the LOGICALREF field in L_WSCHCODE to link characteristic values to their respective characteristic codes.

    | Level| Product ID| Resource ID| Special Code| Source Field| Destination Table| Destination Field| Relation Type| Extra Condition |
    |------|------------|-------------|-------------|-------------|-------------------|-----------------|--------------|----------------|
    | 1| 0| 899| | CHARCODEREF| L_WSCHCODE | LOGICALREF| one-to-one| |
  9. Understand LG_PRCARDS Promotion Line structure

    master

    The LG_PRCARDS table uses a flattened structure to store up to 15 promotion lines directly within the main record. Each line (from PROMLINES1 to PROMLINES15) contains its own set of attributes for the associated item, formula, price, and unit.

    Key fields for each line include:

    • PROMLINESX_STOCKREF: Reference to the Item Card.
    • PROMLINESX_FORMULA: The formula applied to the line.
    • PROMLINESX_PRICE: The price for that specific line.
    • PROMLINESX_RNDVAL: The rounding base.
    • PROMLINESX_UOMREF: Unit reference.
    • PROMLINESX_SITEID: Data processing site.
    • PROMLINESX_RECSTATUS: Record status.
    • PROMLINESX_ORGLOGICREF: Original record reference.
    • PROMLINESX_WFSTATUS: Workflow status (e.g., 'Not In Use').
  10. Understand LG_SLSOPPOR table relations

    master

    The LG_SLSOPPOR table maintains one-to-one relationships with several master data tables. Use these foreign keys to join with related entities:

    • Sales Representative: Join SALESMANREF to LG_SLSMAN.LOGICALREF.
    • Customer / Vendor: Join CSTVNDREF to LG_CSTVND.LOGICALREF.
    • Contact Person: Join CONTACTREF to LG_CONTACTS.LOGICALREF.
    | Level | Product ID | Resource ID | Special Code | Source Field | Destination Table | Destination Field | Relation Type | Extra Condition |
    |-------|------------|-------------|--------------|--------------|-------------------|-------------------|---------------|-----------------|
    | 1 | 0 | 781 | | SALESMANREF | [L_SLSMAN](../LG_SLSMAN "L_SLSMAN") | LOGICALREF | one-to-one | |
    | 1 | 0 | 781 | | CSTVNDREF | [L_CSTVND](../LG_CSTVND "L_CSTVND") | LOGICALREF | one-to-one | |
    | 1 | 0 | 781 | | CONTACTREF | [L_CONTACTS](../LG_CONTACTS "L_CONTACTS") | LOGICALREF | one-to-one | |