jQWidgets Forums

Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts

  • dippy
    Participant
    <!DOCTYPE html>
     <html lang=”en”>
     <head>
     <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.css” type=”text/css” />
     <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.classic.css” type=”text/css” />
     <script type=”text/javascript” src=”../../scripts/jquery-1.10.2.min.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxcore.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxbuttons.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxmenu.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.selection.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.pager.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxtree.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxexpander.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxsplitter.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.edit.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.sort.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.filter.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxcheckbox.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxcalendar.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxnumberinput.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/jqxdatetimeinput.js”></script>
     <script type=”text/javascript” src=”../../jqwidgets/globalization/globalize.js”></script>
     <script type=”text/javascript” src=”../../scripts/demos.js”></script>
     <script type=”text/javascript” src=”generatedata.js”></script>
     <script type=”text/javascript”>
     $(document).ready(function () {
     // prepare the data
     var source =
     {
     datatype: “json”,
    datafields: [
     { name: 'AccInvoiceNo', type: 'string'},
     { name: 'CustomInvoiceNo', type: 'string'},
     { name: 'AccInvoiceDate', type: 'date'},
     { name: 'TerrCode', type: 'number'},
     { name: 'Volume', type: 'number'},
     { name: 'AiValue', type: 'number'},
     { name: 'Ageing', type: 'number'}
     ],
     id: ‘AccInvoiceNo’,
    url: ‘ainv_dtl.php’,
    cache: false,
     root: ‘Rows’,
    beforeprocessing: function (data) {
     source.totalrecords = data[0].TotalRows;
     }
     };
    
    var dataAdapter = new $.jqx.dataAdapter(source);
    
    $(“#jqxgrid”).jqxGrid(
     {
     source: dataAdapter,
     theme: ‘classic’,
    width: 800,
     height: 200,
     //pageable: true,
     //autoheight: true,
     virtualmode: false,
     keyboardnavigation: true,
     rendergridrows: function () {
     return dataAdapter.records;
     },
     columns:
     [
     { text: 'Acc Inv No', datafield: 'AccInvoiceNo', filtertype: 'textbox', filtercondition: 'CONTAINS', columntype: 'textbox', width: 160},
     { text: 'Customs Inv No', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'CONTAINS', datafield: 'CustomInvoiceNo', width: 160},
     { text: 'Acc Inv Date', columntype: 'date', filtertype: 'date', datafield: 'AccInvoiceDate', cellsformat: 'd', width: 90,cellsalign: 'center'},
     { text: 'Territory', columntype: 'textbox', datafield: 'TerrCode',filtercondition: 'CONTAINS', width:75,cellsalign: 'center'},
     { text: 'Volume', columntype: 'textbox', filtertype: 'number',datafield: 'Volume', width: 75,cellsalign: 'right'},
     { text: 'Ai Value', columntype: 'textbox', filtertype: 'number',datafield: 'AiValue', width: 75,cellsalign: 'right',cellsformat: 'n1'},
     { text: 'Ageing', columntype: 'textbox', filtertype: 'number',datafield: 'Ageing', width: 75,cellsalign: 'right'},
     ]
     }); 
    
    // init Orders Grid
     $(“#jqxgrid2″).jqxGrid(
     {
     virtualmode: true,
     //pageable: true,
     width: 1150,
     //autoheight: true,
     height:200,
     theme: ‘classic’,
    keyboardnavigation: true,
     rendergridrows: function (obj) {
     return [];
     },
     columns: [
     //{ text: 'Custom Invoice', columntype: 'textbox', datafield: 'CustomInvoiceNo', width: 160},
     { text: 'SNo', datafield: 'LineNo', editable: false, visible:false, columntype: 'textbox', width: 35,cellsalign: 'right'},
     { text: 'Accounting Invoice', datafield: 'AccInvoiceNo', editable: false, columntype: 'textbox', width: 160},
     { text: 'Item Code', columntype: 'textbox', datafield: 'ItemCode', editable: false, width: 120},
     { text: 'Item Description', columntype: 'textbox', datafield: 'ItemDesc', editable: false, width: 330},
     { text: 'Estm Cost', columntype: 'textbox', datafield: 'EstTerrLndCst', width: 75, editable: false,cellsalign: 'right'},
     { text: 'Sugg RSP', columntype: 'textbox', datafield: 'SuggRSP', width: 70, editable: false,cellsalign: 'right'},
     { text: 'Final RSP', columntype: 'textbox', datafield: 'FinalRSP', width: 70,editable: true,cellsalign: 'right'},
     { text: 'VAT %', columntype: 'textbox', datafield: 'VATPer', width: 60, editable: false,cellsalign: 'right'},
     {
     text: 'Margin', editable: false, datafield: 'margin',width: 65,
     cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
     if ((parseFloat(rowdata.FinalRSP)>0) && parseFloat(rowdata.EstTerrLndCst)>0)
     {
     var FinalRSPNetVat=((parseFloat(rowdata.FinalRSP)*100)/(100+parseFloat(rowdata.VATPer)))
     var margin = ((parseFloat(FinalRSPNetVat)-parseFloat(rowdata.EstTerrLndCst))/parseFloat(FinalRSPNetVat))*100;
     return "<div class='jqx-right-align'>" + dataAdapter.formatNumber(margin, "p2") + "</div>";
     }
     }
     },
     {
     text: 'Markup', editable: false, datafield: 'markup',width: 65,
     cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata)
     {
     if (parseFloat(rowdata.FinalRSP)>0 && parseFloat(rowdata.EstTerrLndCst)>0)
     {
     var FinalRSPNetVat=((parseFloat(rowdata.FinalRSP)*100)/(100+parseFloat(rowdata.VATPer)))
     var markup = ((parseFloat(FinalRSPNetVat)-parseFloat(rowdata.EstTerrLndCst))/parseFloat(rowdata.EstTerrLndCst))*100;
     return "<div class='jqx-right-align'>" + dataAdapter.formatNumber(markup, "p2") + "</div>";
     }
     }
     },
     { text: 'Available', datafield: 'available', columntype: 'checkbox', twostatecheckbox: true,width: 75,cellsalign: 'right'},
     ]
     });
    
    $(“#jqxgrid”).bind(‘rowselect’, function (event) {
     var row = event.args.rowindex; 
    
    var id = $(“#jqxgrid”).jqxGrid(‘getrowdata’, row)['AccInvoiceNo'];
     var source =
     {
     url: ‘ainv_dtl.php’,
    dataType: ‘json’,
    data: {AccInvoiceNo: id},
     datatype: “json”,
    cache: false,
     datafields: [
     //{ name: 'CustomInvoiceNo', type: 'string'},
     { name: 'LineNo', type: 'number'},
     { name: 'AccInvoiceNo', type: 'string'},
     { name: 'ItemCode', type: 'string'},
     { name: 'ItemDesc', type: 'string'},
     { name: 'EstTerrLndCst', type: 'number'},
     { name: 'SuggRSP', type: 'number'},
     { name: 'FinalRSP', type: 'number'},
     { name: 'VATPer', type: 'number'}
     //{ name: 'MRGNPer', type: 'number'}
     ],
     root: ‘Rows’,
    beforeprocessing: function (data) {
     source.totalrecords = data[0].TotalRows;
     }
     };
     var adapter = new $.jqx.dataAdapter(source);
     // initialize jqxGrid
     $(“#jqxgrid2″).jqxGrid(
     {
     source: adapter,
    
    rendergridrows: function (obj) {
     return obj.data;
     }
     });
     });
     });
     </script>
     </head>
     <body class=’default’>
     <h3>Accounting Invoices</h3>
     <div id=”jqxgrid”></div>
     <h3>Accounting Invoice Details</h3>
     <div id=”jqxgrid2″></div>
     </body>
     </html>
    

    dippy
    Participant

    Hi Dimitar,

    The issue is the detail grid is showing all the rows but in 1 column ‘AccInvoiceNo’. As you mentioned earlier both the column names are same with same variable name datafields.

    My Master grid is populating correctly.

    I need to populate the second detail grid based on row selection of 1 grid and my key column is ‘AccInvoiceNo’ which is available in both datafields grids.

    I don’t need pageination as on now.

    Thanks for your reply

    Reposting the code.


    dippy
    Participant

    Hi ,

    I have similar issue..

    My Html code is

    <!DOCTYPE html>
    <html lang=”en”>
    <head>
    <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.css” type=”text/css” />
    <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.classic.css” type=”text/css” />
    <script type=”text/javascript” src=”../../scripts/jquery-1.10.2.min.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcore.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxmenu.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.selection.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.pager.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxtree.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxexpander.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxsplitter.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.edit.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdropdownlist.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.sort.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxgrid.filter.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcheckbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcalendar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxnumberinput.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxdatetimeinput.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/globalization/globalize.js”></script>
    <script type=”text/javascript” src=”../../scripts/demos.js”></script>
    <script type=”text/javascript” src=”generatedata.js”></script>
    <script type=”text/javascript”>
    $(document).ready(function () {
    // prepare the data
    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘AccInvoiceNo’, type: ‘string’},
    { name: ‘CustomInvoiceNo’, type: ‘string’},
    { name: ‘AccInvoiceDate’, type: ‘date’},
    { name: ‘TerrCode’, type: ‘number’},
    { name: ‘Volume’, type: ‘number’},
    { name: ‘AiValue’, type: ‘number’},
    { name: ‘Ageing’, type: ‘number’}
    ],
    id: ‘AccInvoiceNo’,
    url: ‘ainv_dtl.php’,
    cache: false,
    root: ‘Rows’,
    beforeprocessing: function (data) {
    source.totalrecords = data[0].TotalRows;
    }
    };

    var dataAdapter = new $.jqx.dataAdapter(source);

    $(“#jqxgrid”).jqxGrid(
    {
    source: dataAdapter,
    theme: ‘classic’,
    width: 800,
    height: 200,
    //pageable: true,
    //autoheight: true,
    virtualmode: false,
    keyboardnavigation: true,
    rendergridrows: function () {
    return dataAdapter.records;
    },
    columns:
    [
    { text: ‘Acc Inv No’, datafield: ‘AccInvoiceNo’, filtertype: ‘textbox’, filtercondition: ‘CONTAINS’, columntype: ‘textbox’, width: 160},
    { text: ‘Customs Inv No’, columntype: ‘textbox’, filtertype: ‘textbox’, filtercondition: ‘CONTAINS’, datafield: ‘CustomInvoiceNo’, width: 160},
    { text: ‘Acc Inv Date’, columntype: ‘date’, filtertype: ‘date’, datafield: ‘AccInvoiceDate’, cellsformat: ‘d’, width: 90,cellsalign: ‘center’},
    { text: ‘Territory’, columntype: ‘textbox’, datafield: ‘TerrCode’,filtercondition: ‘CONTAINS’, width:75,cellsalign: ‘center’},
    { text: ‘Volume’, columntype: ‘textbox’, filtertype: ‘number’,datafield: ‘Volume’, width: 75,cellsalign: ‘right’},
    { text: ‘Ai Value’, columntype: ‘textbox’, filtertype: ‘number’,datafield: ‘AiValue’, width: 75,cellsalign: ‘right’,cellsformat: ‘n1’},
    { text: ‘Ageing’, columntype: ‘textbox’, filtertype: ‘number’,datafield: ‘Ageing’, width: 75,cellsalign: ‘right’},
    ]
    });

    // init Orders Grid
    $(“#jqxgrid2”).jqxGrid(
    {
    virtualmode: true,
    //pageable: true,
    width: 1150,
    //autoheight: true,
    height:200,
    theme: ‘classic’,
    keyboardnavigation: true,
    rendergridrows: function (obj) {
    return [];
    },
    columns: [
    //{ text: ‘Custom Invoice’, columntype: ‘textbox’, datafield: ‘CustomInvoiceNo’, width: 160},
    { text: ‘SNo’, datafield: ‘LineNo’, editable: false, visible:false, columntype: ‘textbox’, width: 35,cellsalign: ‘right’},
    { text: ‘Accounting Invoice’, datafield: ‘AccInvoiceNo’, editable: false, columntype: ‘textbox’, width: 160},
    { text: ‘Item Code’, columntype: ‘textbox’, datafield: ‘ItemCode’, editable: false, width: 120},
    { text: ‘Item Description’, columntype: ‘textbox’, datafield: ‘ItemDesc’, editable: false, width: 330},
    { text: ‘Estm Cost’, columntype: ‘textbox’, datafield: ‘EstTerrLndCst’, width: 75, editable: false,cellsalign: ‘right’},
    { text: ‘Sugg RSP’, columntype: ‘textbox’, datafield: ‘SuggRSP’, width: 70, editable: false,cellsalign: ‘right’},
    { text: ‘Final RSP’, columntype: ‘textbox’, datafield: ‘FinalRSP’, width: 70,editable: true,cellsalign: ‘right’},
    { text: ‘VAT %’, columntype: ‘textbox’, datafield: ‘VATPer’, width: 60, editable: false,cellsalign: ‘right’},
    {
    text: ‘Margin’, editable: false, datafield: ‘margin’,width: 65,
    cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
    if ((parseFloat(rowdata.FinalRSP)>0) && parseFloat(rowdata.EstTerrLndCst)>0)
    {
    var FinalRSPNetVat=((parseFloat(rowdata.FinalRSP)*100)/(100+parseFloat(rowdata.VATPer)))
    var margin = ((parseFloat(FinalRSPNetVat)-parseFloat(rowdata.EstTerrLndCst))/parseFloat(FinalRSPNetVat))*100;
    return “<div class=’jqx-right-align’>” + dataAdapter.formatNumber(margin, “p2”) + “</div>”;
    }
    }
    },
    {
    text: ‘Markup’, editable: false, datafield: ‘markup’,width: 65,
    cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata)
    {
    if (parseFloat(rowdata.FinalRSP)>0 && parseFloat(rowdata.EstTerrLndCst)>0)
    {
    var FinalRSPNetVat=((parseFloat(rowdata.FinalRSP)*100)/(100+parseFloat(rowdata.VATPer)))
    var markup = ((parseFloat(FinalRSPNetVat)-parseFloat(rowdata.EstTerrLndCst))/parseFloat(rowdata.EstTerrLndCst))*100;
    return “<div class=’jqx-right-align’>” + dataAdapter.formatNumber(markup, “p2”) + “</div>”;
    }
    }
    },
    { text: ‘Available’, datafield: ‘available’, columntype: ‘checkbox’, twostatecheckbox: true,width: 75,cellsalign: ‘right’},
    ]
    });

    $(“#jqxgrid”).bind(‘rowselect’, function (event) {
    var row = event.args.rowindex;

    var id = $(“#jqxgrid”).jqxGrid(‘getrowdata’, row)[‘AccInvoiceNo’];
    var source =
    {
    url: ‘ainv_dtl.php’,
    dataType: ‘json’,
    data: {AccInvoiceNo: id},
    datatype: “json”,
    cache: false,
    datafields: [
    //{ name: ‘CustomInvoiceNo’, type: ‘string’},
    { name: ‘LineNo’, type: ‘number’},
    { name: ‘AccInvoiceNo’, type: ‘string’},
    { name: ‘ItemCode’, type: ‘string’},
    { name: ‘ItemDesc’, type: ‘string’},
    { name: ‘EstTerrLndCst’, type: ‘number’},
    { name: ‘SuggRSP’, type: ‘number’},
    { name: ‘FinalRSP’, type: ‘number’},
    { name: ‘VATPer’, type: ‘number’}
    //{ name: ‘MRGNPer’, type: ‘number’}
    ],
    root: ‘Rows’,
    beforeprocessing: function (data) {
    source.totalrecords = data[0].TotalRows;
    }
    };
    var adapter = new $.jqx.dataAdapter(source);
    // initialize jqxGrid
    $(“#jqxgrid2″).jqxGrid(
    {
    source: adapter,

    rendergridrows: function (obj) {
    return obj.data;
    }
    });
    });
    });
    </script>
    </head>
    <body class=’default’>
    <h3>Accounting Invoices</h3>
    <div id=”jqxgrid”></div>
    <h3>Accounting Invoice Details</h3>
    <div id=”jqxgrid2″></div>
    </body>
    </html>

    and my php code (oracle) is
    ….

    <?php
    #Include the connect.php file
    include(‘xe.php’);
    #Connect to the database
    //connection String

    if ($xeconn == False){
    print “can’t find $database”;
    }
    // get data and store in a json array
    $query = “select * from cps_ainvc_head_test”;
    if (isset($_GET[‘accinvoiceno’]))
    {
    //$pagenum = $_GET[‘pagenum’];
    //$pagesize = $_GET[‘pagesize’];
    //$pagenum = 1;
    //$pagesize = 6;
    //$start = $pagenum * $pagesize;
    $query = “SELECT count(*) over () found_rows,Nvl(B.LINE_NO,0)LINE_NO,
    A.CINVC_NO,
    A.AINVC_NO AS AINVC_NO_DT,
    B.ITEM,
    Initcap(B.ITEM_DESC)ITEM_DESC,
    Round(Nvl(B.EST_UNIT_TERR_LND_CST,0),3)EST_UNIT_TERR_LND_CST,
    Nvl(B.SUG_INIT_PRICE,0)SUG_INIT_PRICE,
    Nvl(B.BUY_FINAL_RSP,0)BUY_FINAL_RSP,
    B.AVG_VAT_RATE,
    rownum rn
    FROM CPS_AINVC_HEAD_TEST A,
    CPS_AINVC_DETL_TEST B,
    DOC_APPROVER_MERCH_HIERARCHY C,
    DOC_APPROVERS D,
    DOC_APPROVER_LVL E,
    DOC_APPROVAL_AUTHORITY F
    WHERE A.CINVC_NO=B.CINVC_NO
    AND A.AINVC_NO=B.AINVC_NO
    AND A.AINVC_NO='”.$_GET[‘accinvoiceno’].”‘
    AND A.FINAL_TO_WH=B.FINAL_TO_WH
    AND B.DEPT=C.APP_DEPT
    AND B.DOC_CURR_APP_SEQ_NO=E.APP_FLOW_SEQ_NO
    AND B.RSP_CHANGE_IND IS NULL
    AND C.APP_CODE=D.APP_CODE
    AND C.APP_CODE=1
    AND E.DOC_TYPE=’CPS’
    AND E.DOC_TYPE=F.DOC_TYPE
    AND E.APP_TYPE=F.APP_TYPE
    ORDER BY B.LINE_NO”;
    $result = oci_parse($xeconn,$query);
    //$sql = “SELECT count(*)found_rows from CPS_AINVC_DETL_TEST”;
    //$rows = oci_parse($xeconn,$sql);
    //$rows =oci_fetch_assoc($rows);
    //$total_rows = $rows[‘found_rows’];
    // get data and store in a json array
    while ($row =oci_fetch_array($result, OCI_ASSOC))
    {
    $accInvDetails[] = array(
    ‘LineNo’ => $row[‘LINE_NO’],
    ‘CustomInvoiceNo’ => $row[‘CINVC_NO’],
    ‘AccInvoiceNoDtl’ => $row[‘AINVC_NO_DT’],
    ‘ItemCode’ => $row[‘ITEM’],
    ‘ItemDesc’ => $row[‘ITEM_DESC’],
    ‘EstTerrLndCst’ => $row[‘EST_UNIT_TERR_LND_CST’],
    ‘SuggRSP’ => $row[‘SUG_INIT_PRICE’],
    ‘FinalRSP’ => $row[‘BUY_FINAL_RSP’],
    ‘VATPer’ => $row[‘AVG_VAT_RATE’],
    );
    }
    $data[] = array(
    // ‘TotalRows’ => $total_rows,
    ‘Rows’ => $accInvDetails
    );
    echo json_encode($data);
    }
    else
    {
    //$pagenum = $_GET[‘pagenum’];
    //$pagesize = $_GET[‘pagesize’];

    //$pagenum = 1;
    //$pagesize = 6;

    //$start = $pagenum * $pagesize;
    $query = “select count(*) over () found_rows,AINVC_NO,
    CINVC_NO,
    AINVC_DT,
    FINAL_TO_WH,
    VOLUME,
    SUM(AI_VALUE)AI_VALUE,
    AGEING
    from
    (SELECT A.AINVC_NO,
    A.CINVC_NO,
    A.AINVC_DT,
    A.FINAL_TO_WH,
    ROUND(A.VOLUME,2)VOLUME,
    ROUND(SUM(B.AI_ITEM_RATE*B.AI_QTY),0)AI_VALUE,
    ROUND((SYSDATE-A.AINVC_DT),0)AGEING
    FROM CPS_AINVC_HEAD_TEST A,
    CPS_AINVC_DETL_TEST B,
    DOC_APPROVER_MERCH_HIERARCHY C,
    DOC_APPROVERS D,
    DOC_APPROVER_LVL E,
    DOC_APPROVAL_AUTHORITY F
    WHERE A.CINVC_NO=B.CINVC_NO
    AND A.AINVC_NO=B.AINVC_NO
    AND A.FINAL_TO_WH=B.FINAL_TO_WH
    AND B.DEPT=C.APP_DEPT
    AND B.DOC_CURR_APP_SEQ_NO=E.APP_FLOW_SEQ_NO
    AND B.RSP_CHANGE_IND IS NULL
    AND C.APP_CODE=D.APP_CODE
    AND C.APP_CODE=1
    AND A.APPROVED_STATUS=’N’
    AND E.DOC_TYPE=’CPS’
    AND E.DOC_TYPE=F.DOC_TYPE
    AND E.APP_TYPE=F.APP_TYPE
    GROUP BY
    A.AINVC_NO,
    A.CINVC_NO,
    A.AINVC_DT,
    A.FINAL_TO_WH,
    A.VOLUME
    ORDER BY
    ROUND((SYSDATE-A.AINVC_DT),0) DESC)
    gROUP BY
    — found_rows,
    AINVC_NO,
    CINVC_NO,
    AINVC_DT,
    FINAL_TO_WH,
    VOLUME,
    AGEING”;

    //where rownum between $start and $pagesize
    //$query = “SELECT SQL_CALC_FOUND_ROWS * FROM customers LIMIT $start, $pagesize”;
    $result = oci_parse($xeconn,$query);
    oci_execute($result);
    //$sql = “SELECT count(*)found_rows from CPS_AINVC_HEAD_TEST”;
    //$rows = oci_parse($xeconn,$sql);
    //echo $sql;
    //oci_execute($rows);
    //$rows =oci_fetch_assoc($rows);

    //$total_rows = $rows[‘FOUND_ROWS’];

    while ($row =oci_fetch_array($result, OCI_ASSOC)) {
    $accInvHead[] = array(
    ‘AccInvoiceNo’ => $row[‘AINVC_NO’],
    ‘CustomInvoiceNo’ => $row[‘CINVC_NO’],
    ‘AccInvoiceDate’ => $row[‘AINVC_DT’],
    ‘TerrCode’ => $row[‘FINAL_TO_WH’],
    ‘Volume’ => $row[‘VOLUME’],
    ‘AiValue’ => $row[‘AI_VALUE’],
    ‘Ageing’ => $row[‘AGEING’],
    );
    }
    $data[] = array(
    //’TotalRows’ => $total_rows,
    ‘Rows’ => $accInvHead
    );
    echo json_encode($data);
    }
    ?>

    Please help me sort the issue…


    dippy
    Participant

    Hi csoga,

    I am also trying for the same thing. No break thru yet. will share the same once done.

    Are you able to populate the 2nd grid.?

    I have done exactly the demo way (removed the paging) and changed the Oracle connection and functions.

    tc.

    in reply to: Master Detail Example Master Detail Example #53980

    dippy
    Participant

    Hi

    Please help on the same or refer old topic.

    regards

    in reply to: Master Detail Example Master Detail Example #53678

    dippy
    Participant

    Hi,

    Please any help on the same.?

    in reply to: Jxgrid Computed Column Jxgrid Computed Column #53615

    dippy
    Participant

    Dear Peter,

    Thanks for your help. Did the sample code way it worked perfectly.

    Next time i’ll choose the correct forum for questions. Apologies

    Thanks again.

Viewing 7 posts - 16 through 22 (of 22 total)