Subversion Repositories SmartDukaan

Rev

Rev 37707 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<table class="table  table-advance">
        <thead>
          <tr>
        <th>Po Id</th>
        <th>Item</th>
        <th>Po Price</th>
        <th>Invoice Price</th>
        <th>System Price</th>
        <th>Quantity</th>
                <th>Excess qty</th>
                <th>Required qty</th> 
                <th>Price Mismatch</th>
            <th>Qty Resolved</th>
            <th>Price Resolved</th>
         
     </tr>      
     </thead>
        <tbody> 
          #foreach($grnRequestItem in $grnRequestItems)   
          
           #set($catalogId = $itemMap.get($grnRequestItem.getItemId()).getCatalogItemId())  
       <tr>             
         <td>$grnRequestItem.getPoId()</td>
         <td>$itemMap.get($grnRequestItem.getItemId()).getItemDescription()</td>
         <td>$warehouseLineItemMap.get($grnRequestItem.getPoId()).get($grnRequestItem.getItemId()).getUnitPrice()</td>
         <td>$warehouseInvoiceItemMap.get($grnRequestItem.getItemId()).getRate()</td>
         
         ## Stock moving between our own warehouses is priced from the stock itself, so the sending supplier
         ## has no circular to quote a system price from and there is nothing to compare the invoice against.
         #set($systemPrice = $vendorCatalogPricingLogMap.get($catalogId))
         #if($systemPrice)
         <td>$systemPrice.getTransferPrice()</td>
         #else
         <td>-</td>
         #end
         
         <td>$grnRequestItem.getQty()</td>     
         <td>$grnRequestItem.getExcessQty()</td>
         #if($grnRequestItem.getExcessQty() > 0)
                <td>  <input type="number" class="form-control requiredQty"  name = "requiredQty"  value = "$grnRequestItem.getRequiredQty()" placeholder="Quantity"/> </td>
                                
         #else
             <td> - </td>
         #end
         <td>$grnRequestItem.getMismatch()</td>
         #if($grnRequestItem.getExcessQty() > 0)
         #if($grnRequestItem.isQtyResolved())
         <td>$grnRequestItem.isQtyResolved()</td>
         #else
         <td> <button class="form-control btn btn-primary resolvedQtyMismatchRequest"  data-mismatch = "$grnRequestItem.getMismatch()" data-id = "$grnRequestItem.getId()" data-invoiceid = "$invoiceId" data-requestid = "$grnRequestItem.getRequestId()" type="button"> Resolve </button> </td>
         #end
         #else
         <td></td>
         #end
         
         #if($grnRequestItem.isPriceResolved())
         <td>$grnRequestItem.isPriceResolved()</td>
         #else
         <td> <button class="form-control btn btn-primary resolvedPriceMismatchRequest" data-mismatch = "$grnRequestItem.getMismatch()" data-id = "$grnRequestItem.getId()" data-invoiceid = "$invoiceId" data-requestid = "$grnRequestItem.getRequestId()" type="button">Resolve</button> </td>
         #end
           </tr>        
      #end
    </tbody>
 </table>

## Resolving a price mismatch discards the PO line and raises a replacement dated to the invoice. That replacement
## is what this invoice is received against, so it is the one that has to stay open long enough for the stock to
## arrive - hence the note rather than leaving people to work it out when a GRN silently stops matching.
<p class="text-muted" style="font-size:12px; margin-top:8px;">
    <b>Po Id</b> is the purchase order this invoice will be received against. Resolving a price mismatch discards
    the original line and raises a replacement on the invoice date at the corrected price.
    Vendor orders close automatically after 6 days; if the stock arrives later, it needs a fresh PO.
    Movement orders stay open until received or cancelled.
</p>