Commit 8e466ae9 authored by SABURI PATEKAR's avatar SABURI PATEKAR

added srd and rfq sql queries and xsl files

parent a3be2b75
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<LINK type="text/css" rel="stylesheet" href="/ibase/css/display_budget.css"/>
<LINK type="text/css" rel="stylesheet" href="/ibase/css/workflowsign.css"/>
<style>
body{
background:#f7f9fc;
font-family:Segoe UI, Arial, Helvetica, sans-serif;
margin:0;
font-size:13px;
color:#2c3e50;
}
/* CARD */
.card{
margin:14px;
background:#fff;
border-radius:8px;
padding:16px;
border:1px solid #e6e9ef;
box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
/* TITLE - LEFT WITH HIGHLIGHT BAR */
.title{
font-weight: 600;
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 20px;
font-size: 15px;
text-align: left !important;
}
/* left blue bar */
.title:before{
content:"";
position:absolute;
left:0;
top:2px;
height:18px;
width:4px;
background:#4a90e2;
border-radius:2px;
}
/* GRID */
.grid{
display:flex;
flex-wrap:wrap;
}
.field{
width:50%;
margin-bottom:10px;
}
/* LABEL */
.label{
font-weight:600;
width:150px;
display:inline-block;
color:#6b7785;
}
/* VALUE */
.value{
color:#1f2d3d;
}
/* TABLE CARD */
.tableCard{
margin:14px;
background:#fff;
border-radius:8px;
padding:12px;
border:1px solid #e6e9ef;
box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
/* TABLE TITLE */
.tableTitle{
font-weight:600;
margin-bottom:10px;
padding-bottom:6px;
border-bottom:1px solid #eee;
position:relative;
padding-left:17px;
}
/* left green bar */
.tableTitle:before{
content:"";
position:absolute;
left:0;
top:2px;
height:16px;
width:4px;
background:#22c55e;
border-radius:2px;
}
/* TABLE */
.tbl{
width:100%;
border-collapse:separate;
border-spacing:0;
font-size:12px;
}
/* HEADER */
.tbl th{
background:#f1f5fb;
color:#2c3e50;
padding:8px;
font-size:12px;
text-align:left;
border-bottom:1px solid #e5e7eb;
white-space:nowrap;
}
/* CELLS */
.tbl td{
padding:8px;
border-bottom:1px solid #eef1f5;
white-space:nowrap;
}
/* ROW STYLE */
.tbl tr:nth-child(even){
background:#fafbfe;
}
.tbl tr:hover{
background:#eef4ff;
}
/* ALIGNMENT */
.right{
text-align:right;
font-variant-numeric: tabular-nums;
}
</style>
</head>
<body>
<div>
<xsl:apply-templates select="//Detail1"/>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="Detail1">
<div class="card">
<div class="title">REQUEST FOR QUOTATION ( Quotation Team )</div>
<div class="grid">
<div class="field">
<span class="label">RFQ No :</span>
<span class="value"><xsl:value-of select="tran_id"/></span>
</div>
<div class="field">
<span class="label">RFQ Date :</span>
<span class="value"><xsl:value-of select="tran_date"/></span>
</div>
<div class="field">
<span class="label">Quotation Type :</span>
<span class="value">
<xsl:choose>
<xsl:when test="quot_type = 'C'">Customer</xsl:when>
<xsl:when test="quot_type = 'I'">Institute</xsl:when>
<xsl:when test="quot_type = 'G'">Group</xsl:when>
<xsl:otherwise><xsl:value-of select="quot_type"/></xsl:otherwise>
</xsl:choose>
</span>
</div>
<div class="field">
<span class="label">Customer :</span>
<span class="value"><xsl:value-of select="cust_code"/></span>
</div>
<div class="field">
<span class="label">Contact Person :</span>
<span class="value"><xsl:value-of select="contact_pers"/></span>
</div>
<div class="field">
<span class="label">Item Series :</span>
<span class="value"><xsl:value-of select="item_ser"/></span>
</div>
<div class="field">
<span class="label">Required Date :</span>
<span class="value"><xsl:value-of select="req_date"/></span>
</div>
<div class="field">
<span class="label">Valid Upto :</span>
<span class="value"><xsl:value-of select="valid_upto"/></span>
</div>
<div class="field">
<span class="label">Sales Person :</span>
<span class="value"><xsl:value-of select="sales_pers"/></span>
</div>
</div>
</div>
<div class="tableCard">
<div class="tableTitle">Item Details</div>
<div style="max-height:400px; overflow:auto;">
<table class="tbl">
<tr>
<th>Line</th>
<th>Item</th>
<th>Qty</th>
<th>Unit</th>
<th>Pack</th>
<th>Competitor Item</th>
<th>Competitor Name</th>
<th>Competitor Rate</th>
<th>Special Rate</th>
<th>Management Approved Rate</th>
<th>Price To Stockist</th>
<th>Price To Distributor</th>
<th>Price To Retailer</th>
<th>Revised: Price To Stockist</th>
<th>Revised: Price To Distributor</th>
<th>Revised: Price To Retailer</th>
<th>Remarks</th>
</tr>
<xsl:for-each select="//Detail2">
<tr>
<td>
<xsl:value-of select="item_code"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="descr"/>
</td>
<td class="right">
<xsl:value-of select="format-number(qty_quot,'#,##0.00')"/>
</td>
<td><xsl:value-of select="unit"/></td>
<td><xsl:value-of select="pack_code"/></td>
<td><xsl:value-of select="competitor_item"/></td>
<td><xsl:value-of select="competitor_name"/></td>
<td class="right">
<xsl:value-of select="format-number(competitor_rate,'#,##0.00')"/>
</td>
<td class="right">
<xsl:value-of select="format-number(rate_quot,'#,##0.00')"/>
</td>
<td class="right">
<xsl:value-of select="format-number(rate_apprv,'#,##0.00')"/>
</td>
<td class="right"><xsl:value-of select="format-number(pts, '#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(ptd, '#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(ptr, '#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(revised_pts, '#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(revised_ptd, '#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(revised_ptr, '#,##0.00')"/></td>
<td><xsl:value-of select="remarks"/></td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<LINK type="text/css" rel="stylesheet" href="/ibase/css/display_budget.css"/>
<LINK type="text/css" rel="stylesheet" href="/ibase/css/workflowsign.css"/>
<style>
body{
background:#f7f9fc;
font-family:Segoe UI, Arial, Helvetica, sans-serif;
margin:0;
font-size:13px;
color:#2c3e50;
}
/* CARD */
.card{
margin:14px;
background:#fff;
border-radius:8px;
padding:16px;
border:1px solid #e6e9ef;
box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
/* TITLE - LEFT WITH HIGHLIGHT BAR */
.title
{
font-size: 17px;
font-weight: 600;
margin-bottom: 14px;
padding-bottom: 6px;
padding-right: 180px;
border-bottom: 1px solid #eee;
position: sticky;
text-align: left !important;
}
/* left blue bar */
.title:before{
content:"";
position:absolute;
left:0;
top:2px;
height:18px;
width:4px;
background:#4a90e2;
border-radius:2px;
}
/* GRID */
.grid{
display:flex;
flex-wrap:wrap;
}
.field{
width:50%;
margin-bottom:10px;
}
/* LABEL */
.label{
font-weight:600;
width:150px;
display:inline-block;
color:#6b7785;
}
/* VALUE */
.value{
color:#1f2d3d;
}
/* TABLE CARD */
.tableCard{
margin:14px;
background:#fff;
border-radius:8px;
padding:12px;
border:1px solid #e6e9ef;
box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
/* TABLE TITLE */
.tableTitle{
font-weight:600;
margin-bottom:10px;
padding-bottom:6px;
border-bottom:1px solid #eee;
position:relative;
padding-left: 20px;
}
/* left green bar */
.tableTitle:before{
content:"";
position:absolute;
left:0;
top:2px;
height:16px;
width:4px;
background:#22c55e;
border-radius:2px;
}
/* TABLE */
.tbl{
width:100%;
border-collapse:separate;
border-spacing:0;
font-size:12px;
}
/* HEADER */
.tbl th{
background:#f1f5fb;
color:#2c3e50;
padding:8px;
font-size:12px;
text-align:left;
border-bottom:1px solid #e5e7eb;
white-space:nowrap;
}
/* CELLS */
.tbl td{
padding:8px;
border-bottom:1px solid #eef1f5;
white-space:nowrap;
}
/* ROW STYLE */
.tbl tr:nth-child(even){
background:#fafbfe;
}
.tbl tr:hover{
background:#eef4ff;
}
/* ALIGNMENT */
.right{
text-align:right;
font-variant-numeric: tabular-nums;
}
/* subtle highlight for approved */
.tbl td:nth-child(9){
background:#f0fdf4;
font-weight:600;
color:#15803d;
}
.inputRate{
width:90px;
padding:4px 6px;
border:1px solid #d1d5db;
border-radius:4px;
text-align:right;
font-size:12px;
}
.inputRate:focus{
outline:none;
border-color:#4a90e2;
box-shadow:0 0 0 2px rgba(74,144,226,0.15);
}
</style>
</head>
<body>
<div>
<xsl:apply-templates select="//Detail1"/>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="Detail1">
<div class="card">
<div class="title">REQUEST FOR QUOTATION ( Management Team )</div>
<div class="grid">
<div class="field">
<span class="label">RFQ No :</span>
<span class="value"><xsl:value-of select="tran_id"/></span>
</div>
<div class="field">
<span class="label">RFQ Date :</span>
<span class="value"><xsl:value-of select="tran_date"/></span>
</div>
<div class="field">
<span class="label">Quotation Type :</span>
<span class="value">
<xsl:choose>
<xsl:when test="quot_type = 'C'">Customer</xsl:when>
<xsl:when test="quot_type = 'I'">Institute</xsl:when>
<xsl:when test="quot_type = 'G'">Group</xsl:when>
<xsl:otherwise><xsl:value-of select="quot_type"/></xsl:otherwise>
</xsl:choose>
</span>
</div>
<div class="field">
<span class="label">Customer :</span>
<span class="value"><xsl:value-of select="cust_code"/></span>
</div>
<div class="field">
<span class="label">Contact Person :</span>
<span class="value"><xsl:value-of select="contact_pers"/></span>
</div>
<div class="field">
<span class="label">Item Series :</span>
<span class="value"><xsl:value-of select="item_ser"/></span>
</div>
<div class="field">
<span class="label">Required Date :</span>
<span class="value"><xsl:value-of select="req_date"/></span>
</div>
<div class="field">
<span class="label">Valid Upto :</span>
<span class="value"><xsl:value-of select="valid_upto"/></span>
</div>
<div class="field">
<span class="label">Sales Person :</span>
<span class="value"><xsl:value-of select="sales_pers"/></span>
</div>
</div>
</div>
<div class="tableCard">
<div class="tableTitle">Item Details</div>
<div style="max-height:400px; overflow:auto;">
<table class="tbl">
<tr>
<th>Item</th>
<th>Qty</th>
<th>Unit</th>
<th>Pack</th>
<th>Competitor Item</th>
<th>Competitor Name</th>
<th>Competitor Rate</th>
<th>Special Rate</th>
<th>Management Approved Rate</th>
<th>Price To Stockist</th>
<th>Price To Distributor</th>
<th>Price To Retailer</th>
<th>Revised: Price To Stockist</th>
<th>Revised: Price To Distributor</th>
<th>Revised: Price To Retailer</th>
<th>Remarks</th>
</tr>
<xsl:for-each select="//Detail2">
<tr>
<td>
<xsl:value-of select="item_code"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="descr"/>
</td>
<td class="right">
<xsl:value-of select="format-number(qty_quot,'#,##0.00')"/>
</td>
<td><xsl:value-of select="unit"/></td>
<td><xsl:value-of select="pack_code"/></td>
<td><xsl:value-of select="competitor_item"/></td>
<td><xsl:value-of select="competitor_name"/></td>
<td class="right">
<xsl:value-of select="format-number(competitor_rate,'#,##0.00')"/>
</td>
<td class="right">
<xsl:value-of select="format-number(rate_quot,'#,##0.00')"/>
</td>
<td class="right">
<input type="text" class="inputRate">
<xsl:attribute name="value">
<xsl:value-of select="format-number(rate_apprv,'#,##0.00')"/>
</xsl:attribute>
</input>
</td>
<td class="right"><xsl:value-of select="format-number(pts,'#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(ptd,'#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(ptr,'#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(revised_pts,'#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(revised_ptd,'#,##0.00')"/></td>
<td class="right"><xsl:value-of select="format-number(revised_ptr,'#,##0.00')"/></td>
<td><xsl:value-of select="remarks"/></td>
</tr>
</xsl:for-each>
</table>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment