[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/layouts/vlayout/modules/Inventory/ -> LineItemsContent.tpl (source)

   1  {*<!--
   2  /*********************************************************************************
   3    ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4     * ("License"); You may not use this file except in compliance with the License
   5     * The Original Code is:  vtiger CRM Open Source
   6     * The Initial Developer of the Original Code is vtiger.
   7     * Portions created by vtiger are Copyright (C) vtiger.
   8     * All Rights Reserved.
   9    *
  10   ********************************************************************************/
  11  -->*}
  12  {strip}
  13      {assign var="deleted" value="deleted"|cat:$row_no}
  14      {assign var="hdnProductId" value="hdnProductId"|cat:$row_no}
  15      {assign var="productName" value="productName"|cat:$row_no}
  16      {assign var="comment" value="comment"|cat:$row_no}
  17      {assign var="productDescription" value="productDescription"|cat:$row_no}
  18      {assign var="qtyInStock" value="qtyInStock"|cat:$row_no}
  19      {assign var="qty" value="qty"|cat:$row_no}
  20      {assign var="listPrice" value="listPrice"|cat:$row_no}
  21      {assign var="productTotal" value="productTotal"|cat:$row_no}
  22      {assign var="subproduct_ids" value="subproduct_ids"|cat:$row_no}
  23      {assign var="subprod_names" value="subprod_names"|cat:$row_no}
  24      {assign var="entityIdentifier" value="entityType"|cat:$row_no}
  25      {assign var="entityType" value=$data.$entityIdentifier}
  26  
  27      {assign var="discount_type" value="discount_type"|cat:$row_no}
  28      {assign var="discount_percent" value="discount_percent"|cat:$row_no}
  29      {assign var="checked_discount_percent" value="checked_discount_percent"|cat:$row_no}
  30      {assign var="style_discount_percent" value="style_discount_percent"|cat:$row_no}
  31      {assign var="discount_amount" value="discount_amount"|cat:$row_no}
  32      {assign var="checked_discount_amount" value="checked_discount_amount"|cat:$row_no}
  33      {assign var="style_discount_amount" value="style_discount_amount"|cat:$row_no}
  34      {assign var="checked_discount_zero" value="checked_discount_zero"|cat:$row_no}
  35  
  36      {assign var="discountTotal" value="discountTotal"|cat:$row_no}
  37      {assign var="totalAfterDiscount" value="totalAfterDiscount"|cat:$row_no}
  38      {assign var="taxTotal" value="taxTotal"|cat:$row_no}
  39      {assign var="netPrice" value="netPrice"|cat:$row_no}
  40      {assign var="FINAL" value=$RELATED_PRODUCTS.1.final_details}
  41      
  42      {assign var="productDeleted" value="productDeleted"|cat:$row_no}
  43          {assign var="productId" value=$data[$hdnProductId]}
  44          {assign var="listPriceValues" value=Products_Record_Model::getListPriceValues($productId)}
  45      <td>
  46          <i class="icon-trash deleteRow cursorPointer" title="{vtranslate('LBL_DELETE',$MODULE)}"></i>
  47          &nbsp;<a><img src="{vimage_path('drag.png')}" border="0" title="{vtranslate('LBL_DRAG',$MODULE)}"/></a>
  48          <input type="hidden" class="rowNumber" value="{$row_no}" />
  49      </td>
  50      <td>
  51          <!-- Product Re-Ordering Feature Code Addition Starts -->
  52          <input type="hidden" name="hidtax_row_no{$row_no}" id="hidtax_row_no{$row_no}" value="{$tax_row_no}"/>
  53          <!-- Product Re-Ordering Feature Code Addition ends -->
  54          <div>
  55              <input type="text" id="{$productName}" name="{$productName}" value="{$data.$productName}" class="productName {if $row_no neq 0} autoComplete {/if}" placeholder="{vtranslate('LBL_TYPE_SEARCH',$MODULE)}" data-validation-engine="validate[required]" {if !empty($data.$productName)} disabled="disabled" {/if}/>
  56              <input type="hidden" id="{$hdnProductId}" name="{$hdnProductId}" value="{$data.$hdnProductId}" class="selectedModuleId"/>
  57              <input type="hidden" id="lineItemType{$row_no}" name="lineItemType{$row_no}" value="{$entityType}" class="lineItemType"/>
  58              {if $row_no eq 0}
  59                  <img class="lineItemPopup cursorPointer alignMiddle" data-popup="ServicesPopup" title="{vtranslate('Services',$MODULE)}" data-module-name="Services" data-field-name="serviceid" src="{vimage_path('Services.png')}"/>
  60                  <img class="lineItemPopup cursorPointer alignMiddle" data-popup="ProductsPopup" title="{vtranslate('Products',$MODULE)}" data-module-name="Products" data-field-name="productid" src="{vimage_path('Products.png')}"/>
  61                  &nbsp;<i class="icon-remove-sign clearLineItem cursorPointer" title="{vtranslate('LBL_CLEAR',$MODULE)}" style="vertical-align:middle"></i>
  62              {else}
  63                  {if !$RECORD_ID} 
  64                                      {if ($entityType eq 'Services') and (!$data.$productDeleted) or $PRODUCT_ACTIVE neq 'true'} 
  65                      <img class="lineItemPopup cursorPointer alignMiddle" data-popup="ServicesPopup" data-module-name="Services" title="{vtranslate('Services',$MODULE)}" data-field-name="serviceid" src="{vimage_path('Services.png')}"/>
  66                      &nbsp;<i class="icon-remove-sign clearLineItem cursorPointer" title="{vtranslate('LBL_CLEAR',$MODULE)}" style="vertical-align:middle"></i>
  67                                      {elseif (!$data.$productDeleted)}
  68                                              <img class="lineItemPopup cursorPointer alignMiddle" data-popup="ProductsPopup" data-module-name="Products" title="{vtranslate('Products',$MODULE)}" data-field-name="productid" src="{vimage_path('Products.png')}"/>
  69                                              &nbsp;<i class="icon-remove-sign clearLineItem cursorPointer" title="{vtranslate('LBL_CLEAR',$MODULE)}" style="vertical-align:middle"></i>
  70                                      {/if}   
  71                                  {else} 
  72                                      {if ($entityType eq 'Services') and (!$data.$productDeleted)} 
  73                                              <img class="{if $SERVICE_ACTIVE}lineItemPopup{/if} cursorPointer alignMiddle" data-popup="ServicesPopup" data-module-name="Services" title="{vtranslate('Services',$MODULE)}" data-field-name="serviceid" src="{vimage_path('Services.png')}"/> 
  74                                              &nbsp;<i class="icon-remove-sign {if $SERVICE_ACTIVE}clearLineItem{/if} cursorPointer" title="{vtranslate('LBL_CLEAR',$MODULE)}" style="vertical-align:middle"></i> 
  75                                      {elseif (!$data.$productDeleted)} 
  76                                              <img class="{if $PRODUCT_ACTIVE}lineItemPopup{/if} cursorPointer alignMiddle" data-popup="ProductsPopup" data-module-name="Products" title="{vtranslate('Products',$MODULE)}" data-field-name="productid" src="{vimage_path('Products.png')}"/> 
  77                                          &nbsp;<i class="icon-remove-sign {if $PRODUCT_ACTIVE}clearLineItem{/if} cursorPointer" title="{vtranslate('LBL_CLEAR',$MODULE)}" style="vertical-align:middle"></i> 
  78                                      {/if}   
  79                                  {/if} 
  80              {/if}
  81          </div>
  82          <input type="hidden" value="{$data.$subproduct_ids}" id="{$subproduct_ids}" name="{$subproduct_ids}" class="subProductIds" />
  83          <div id="{$subprod_names}" name="{$subprod_names}" class="subInformation"><span class="subProductsContainer">{$data.$subprod_names}</span></div>
  84          {if $data.$productDeleted}
  85              <div class="row-fluid deletedItem redColor">
  86                  {if empty($data.$productName)}
  87                      {vtranslate('LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM',$MODULE)}
  88                  {else}
  89                      {vtranslate('LBL_THIS',$MODULE)} {$entityType} {vtranslate('LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM',$MODULE)}
  90                  {/if}
  91              </div>
  92          {else}
  93              <div><br><textarea id="{$comment}" name="{$comment}" class="lineItemCommentBox">{$data.$comment}</textarea>
  94          {/if}
  95      </td>
  96      <td>
  97          <input id="{$qty}" name="{$qty}" type="text" class="qty smallInputBox" data-validation-engine="validate[required,funcCall[Vtiger_GreaterThanZero_Validator_Js.invokeValidation]]" value="{if !empty($data.$qty)}{$data.$qty}{else}1{/if}"/>
  98          {if $MODULE neq 'PurchaseOrder'}
  99          <br>
 100          <span class="stockAlert redColor {if $data.$qty <= $data.$qtyInStock}hide{/if}" >
 101              {vtranslate('LBL_STOCK_NOT_ENOUGH',$MODULE)}
 102              <br>
 103              {vtranslate('LBL_MAX_QTY_SELECT',$MODULE)}&nbsp;<span class="maxQuantity">{$data.$qtyInStock}</span>
 104          </span>
 105          {/if}
 106      </td>
 107      <td>
 108          <div>
 109              <input id="{$listPrice}" name="{$listPrice}" value="{if !empty($data.$listPrice)}{$data.$listPrice}{else}0{/if}" type="text" data-validation-engine="validate[required,funcCall[Vtiger_PositiveNumber_Validator_Js.invokeValidation]]" class="listPrice smallInputBox" list-info='{if !empty($data.$listPrice)}{Zend_Json::encode($listPriceValues)}{/if}'/>
 110              &nbsp;
 111              {assign var=PRICEBOOK_MODULE_MODEL value=Vtiger_Module_Model::getInstance('PriceBooks')}
 112              {if $PRICEBOOK_MODULE_MODEL->isPermitted('DetailView')}
 113                  <img src="{vimage_path('PriceBooks.png')}" class="cursorPointer alignMiddle priceBookPopup" data-popup="Popup" data-module-name="PriceBooks" title="{vtranslate('PriceBooks',$MODULE)}"/>
 114              {/if}
 115          </div>
 116          <div>
 117              <span>
 118                  (-)&nbsp; <b><a href="javascript:void(0)" class="individualDiscount">{vtranslate('LBL_DISCOUNT',$MODULE)}</a> : </b>
 119              </span>
 120          </div>
 121          <div class="discountUI validCheck hide" id="discount_div{$row_no}">
 122          {assign var="DISCOUNT_TYPE" value="zero"}
 123          {if !empty($data.$discount_type)}
 124              {assign var="DISCOUNT_TYPE" value=$data.$discount_type}
 125          {/if}
 126              <input type="hidden" id="discount_type{$row_no}" name="discount_type{$row_no}" value="{$DISCOUNT_TYPE}" class="discount_type" />
 127              <table width="100%" border="0" cellpadding="5" cellspacing="0" class="table table-nobordered popupTable">
 128                 <tr>
 129                     <!-- TODO : CLEAN : should not append product total it should added in the js because product total can change at any point of time -->
 130                      <th id="discount_div_title{$row_no}" nowrap><b>{vtranslate('LBL_SET_DISCOUNT_FOR',$MODULE)} : {$data.$productTotal}</b></th>
 131                      <th>
 132                          <button type="button" class="close closeDiv">x</button>
 133                      </th>
 134                 </tr>
 135                 <!-- TODO : discount price and amount are hide by default we need to check id they are already selected if so we should not hide them  -->
 136                 <tr>
 137                      <td>
 138                          <input type="radio" name="discount{$row_no}" {$data.$checked_discount_zero} {if empty($data)}checked{/if} class="discounts" data-discount-type="zero" />
 139                          &nbsp;
 140                          {vtranslate('LBL_ZERO_DISCOUNT',$MODULE)}
 141                      </td>
 142                      <td>
 143                          <!-- Make the discount value as zero -->
 144                          <input type="hidden" class="discountVal" value="0" />
 145                      </td>
 146                 </tr>
 147                 <tr>
 148                      <td>
 149                          <input type="radio" name="discount{$row_no}" {$data.$checked_discount_percent} class="discounts" data-discount-type="percentage" />
 150                          &nbsp; %
 151                          {vtranslate('LBL_OF_PRICE',$MODULE)}
 152                      </td>
 153                      <td>
 154                          <span class="pull-right">&nbsp;%</span>
 155                          <input type="text" data-validation-engine="validate[funcCall[Vtiger_PositiveNumber_Validator_Js.invokeValidation]]" id="discount_percentage{$row_no}" name="discount_percentage{$row_no}" value="{$data.$discount_percent}" class="discount_percentage smallInputBox pull-right discountVal {if empty($data.$checked_discount_percent)}hide{/if}" />
 156                      </td>
 157                 </tr>
 158                 <tr>
 159                      <td class="LineItemDirectPriceReduction">
 160                          <input type="radio" name="discount{$row_no}" {$data.$checked_discount_amount} class="discounts" data-discount-type="amount" />
 161                          &nbsp;
 162                          {vtranslate('LBL_DIRECT_PRICE_REDUCTION',$MODULE)}
 163                      </td>
 164                      <td>
 165                          <input type="text" data-validation-engine="validate[funcCall[Vtiger_PositiveNumber_Validator_Js.invokeValidation]]" id="discount_amount{$row_no}" name="discount_amount{$row_no}" value="{$data.$discount_amount}" class="smallInputBox pull-right discount_amount discountVal {if empty($data.$checked_discount_amount)}hide{/if}"/>
 166                      </td>
 167                 </tr>
 168              </table>
 169              <div class="modal-footer lineItemPopupModalFooter modal-footer-padding">
 170                  <div class=" pull-right cancelLinkContainer">
 171                      <a class="cancelLink" type="reset" data-dismiss="modal">{vtranslate('LBL_CANCEL', $MODULE)}</a>
 172                  </div>
 173                  <button class="btn btn-success discountSave" type="button" name="lineItemActionSave"><strong>{vtranslate('LBL_SAVE', $MODULE)}</strong></button>
 174              </div>
 175          </div>
 176          <div>
 177              <b>{vtranslate('LBL_TOTAL_AFTER_DISCOUNT',$MODULE)} :</b>
 178          </div>
 179          <div class="individualTaxContainer {if $IS_GROUP_TAX_TYPE}hide{/if}">
 180              (+)&nbsp;<b><a href="javascript:void(0)" class="individualTax">{vtranslate('LBL_TAX',$MODULE)} </a> : </b>
 181          </div>
 182          <span class="taxDivContainer">
 183              <div class="taxUI hide" id="tax_div{$row_no}">
 184              <!-- we will form the table with all taxes -->
 185              <table width="100%" border="0" cellpadding="5" cellspacing="0" class="table table-nobordered popupTable" id="tax_table{$row_no}">
 186                 <tr>
 187                      <th id="tax_div_title{$row_no}" nowrap align="left" ><b>{vtranslate('LBL_SET_TAX_FOR',$MODULE)} : {$data.$totalAfterDiscount}</b></th>
 188                      <th colspan="2">
 189                          <button type="button" class="close closeDiv">x</button>
 190                      </th>
 191                 </tr>
 192  
 193              {foreach key=tax_row_no item=tax_data from=$data.taxes}
 194                 {assign var="taxname" value=$tax_data.taxname|cat:"_percentage"|cat:$row_no}
 195                 {assign var="tax_id_name" value="hidden_tax"|cat:$tax_row_no+1|cat:"_percentage"|cat:$row_no}
 196                 {assign var="taxlabel" value=$tax_data.taxlabel|cat:"_percentage"|cat:$row_no}
 197                 {assign var="popup_tax_rowname" value="popup_tax_row"|cat:$row_no}
 198                 <tr>
 199                  <td>
 200                      <input type="text" data-validation-engine="validate[funcCall[Vtiger_PositiveNumber_Validator_Js.invokeValidation]]" name="{$taxname}" id="{$taxname}" value="{$tax_data.percentage}" class="smallInputBox taxPercentage" />&nbsp;%
 201                  </td>
 202                  <td><div class="textOverflowEllipsis">{$tax_data.taxlabel}</div></td>
 203                  <td>
 204                      <input type="text" name="{$popup_tax_rowname}" class="cursorPointer smallInputBox taxTotal" value="{$tax_data.amount}" readonly />
 205                  </td>
 206                 </tr>
 207              {/foreach}
 208              </table>
 209              <div class="modal-footer lineItemPopupModalFooter modal-footer-padding">
 210                  <div class=" pull-right cancelLinkContainer">
 211                      <a class="cancelLink" type="reset" data-dismiss="modal">{vtranslate('LBL_CANCEL', $MODULE)}</a>
 212                  </div>
 213                  <button class="btn btn-success taxSave" type="button" name="lineItemActionSave"><strong>{vtranslate('LBL_SAVE', $MODULE)}</strong></button>
 214              </div>
 215              </div>
 216          </span>
 217      </td>
 218      <td>
 219          <div id="productTotal{$row_no}" align="right" class="productTotal">{if $data.$productTotal}{$data.$productTotal}{else}0.00{/if}</div>
 220          <div id="discountTotal{$row_no}" align="right" class="discountTotal">{if $data.$discountTotal}{$data.$discountTotal}{else}0.00{/if}</div>
 221          <div id="totalAfterDiscount{$row_no}" align="right" class="totalAfterDiscount">{if $data.$totalAfterDiscount}{$data.$totalAfterDiscount}{else}0.00{/if}</div>
 222          <div id="taxTotal{$row_no}" align="right" class="productTaxTotal {if $IS_GROUP_TAX_TYPE}hide{/if}">{if $data.$taxTotal}{$data.$taxTotal}{else}0.00{/if}</div>
 223      </td>
 224      <td>
 225          <span id="netPrice{$row_no}" class="pull-right netPrice">{if $data.$netPrice}{$data.$netPrice}{else}0.00{/if}</span>
 226      </td>


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1