{*+********************************************************************************** * The contents of this file are subject to the vtiger CRM Public License Version 1.1 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. *************************************************************************************} {strip} {assign var="deleted" value="deleted"|cat:$row_no} {assign var="image" value="productImage"|cat:$row_no} {assign var="purchaseCost" value="purchaseCost"|cat:$row_no} {assign var="margin" value="margin"|cat:$row_no} {assign var="hdnProductId" value="hdnProductId"|cat:$row_no} {assign var="productName" value="productName"|cat:$row_no} {assign var="comment" value="comment"|cat:$row_no} {assign var="productDescription" value="productDescription"|cat:$row_no} {assign var="qtyInStock" value="qtyInStock"|cat:$row_no} {assign var="qty" value="qty"|cat:$row_no} {assign var="listPrice" value="listPrice"|cat:$row_no} {assign var="productTotal" value="productTotal"|cat:$row_no} {assign var="subproduct_ids" value="subproduct_ids"|cat:$row_no} {assign var="subprod_names" value="subprod_names"|cat:$row_no} {assign var="subprod_qty_list" value="subprod_qty_list"|cat:$row_no} {assign var="entityIdentifier" value="entityType"|cat:$row_no} {assign var="entityType" value=$data.$entityIdentifier} {assign var="discount_type" value="discount_type"|cat:$row_no} {assign var="discount_percent" value="discount_percent"|cat:$row_no} {assign var="checked_discount_percent" value="checked_discount_percent"|cat:$row_no} {assign var="style_discount_percent" value="style_discount_percent"|cat:$row_no} {assign var="discount_amount" value="discount_amount"|cat:$row_no} {assign var="checked_discount_amount" value="checked_discount_amount"|cat:$row_no} {assign var="style_discount_amount" value="style_discount_amount"|cat:$row_no} {assign var="checked_discount_zero" value="checked_discount_zero"|cat:$row_no} {assign var="discountTotal" value="discountTotal"|cat:$row_no} {assign var="totalAfterDiscount" value="totalAfterDiscount"|cat:$row_no} {assign var="taxTotal" value="taxTotal"|cat:$row_no} {assign var="netPrice" value="netPrice"|cat:$row_no} {assign var="FINAL" value=$RELATED_PRODUCTS.1.final_details} {assign var="productDeleted" value="productDeleted"|cat:$row_no} {assign var="productId" value=$data[$hdnProductId]} {assign var="listPriceValues" value=Products_Record_Model::getListPriceValues($productId)} {if $MODULE eq 'PurchaseOrder'} {assign var="listPriceValues" value=array()} {assign var="purchaseCost" value="{if $data.$purchaseCost}{((float)$data.$purchaseCost) / ((float)$data.$qty * {$RECORD_CURRENCY_RATE})}{else}0{/if}"} {foreach item=currency_details from=$CURRENCIES} {append var='listPriceValues' value=$currency_details.conversionrate * $purchaseCost index=$currency_details.currency_id} {/foreach} {/if}   {if $IMAGE_EDITABLE} {/if} {if $PRODUCT_EDITABLE}
{if !$data.$productDeleted} {/if}
{if $row_no eq 0} {Vtiger_Module_Model::getModuleIconPath('Services')} {Vtiger_Module_Model::getModuleIconPath('Products')} {elseif $entityType eq '' and $PRODUCT_ACTIVE eq 'true'} {Vtiger_Module_Model::getModuleIconPath('Products')} {elseif $entityType eq '' and $SERVICE_ACTIVE eq 'true'} {Vtiger_Module_Model::getModuleIconPath('Services')} {else} {if ($entityType eq 'Services') and (!$data.$productDeleted)} {Vtiger_Module_Model::getModuleIconPath('Services')} {elseif (!$data.$productDeleted)} {Vtiger_Module_Model::getModuleIconPath('Products')} {/if} {/if}
{foreach key=SUB_PRODUCT_ID item=SUB_PRODUCT_INFO from=$data.$subprod_qty_list} - {$SUB_PRODUCT_INFO.name} ({$SUB_PRODUCT_INFO.qty}) {if $SUB_PRODUCT_INFO.qty > getProductQtyInStock($SUB_PRODUCT_ID)}  - {vtranslate('LBL_STOCK_NOT_ENOUGH', $MODULE)} {/if}
{/foreach}
{if $data.$productDeleted}
{if empty($data.$productName)} {vtranslate('LBL_THIS_LINE_ITEM_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_THIS_LINE_ITEM',$MODULE)} {else} {vtranslate('LBL_THIS',$MODULE)} {$entityType} {vtranslate('LBL_IS_DELETED_FROM_THE_SYSTEM_PLEASE_REMOVE_OR_REPLACE_THIS_ITEM',$MODULE)} {/if}
{else} {if $COMMENT_EDITABLE}

{/if} {/if} {/if} {if $PURCHASE_COST_EDITABLE eq false and $MODULE neq 'PurchaseOrder'} {/if} {if $MARGIN_EDITABLE eq false} {/if} {if $MODULE neq 'PurchaseOrder'}
{/if} {if $PURCHASE_COST_EDITABLE} {if $data.$purchaseCost}{$data.$purchaseCost}{else}0{/if} {/if} {if $LIST_PRICE_EDITABLE}
isAdminUser())} readonly {/if} id="{$listPrice}" name="{$listPrice}" value="{if !empty($data.$listPrice)}{$data.$listPrice}{else}0{/if}" type="text" data-rule-required=true data-rule-positive=true class="listPrice smallInputBox inputElement" data-is-price-changed="{if $RECORD_ID && $row_no neq 0}true{else}false{/if}" list-info='{if isset($data.$listPrice)}{Zend_Json::encode($listPriceValues)}{/if}' data-base-currency-id="{getProductBaseCurrency($productId, {$entityType})}" />   {assign var=PRICEBOOK_MODULE_MODEL value=Vtiger_Module_Model::getInstance('PriceBooks')} {if $PRICEBOOK_MODULE_MODEL->isPermitted('DetailView') && $MODULE != 'PurchaseOrder'} {Vtiger_Module_Model::getModuleIconPath('PriceBooks')} {/if}
{if $ITEM_DISCOUNT_AMOUNT_EDITABLE || $ITEM_DISCOUNT_PERCENT_EDITABLE}
(-)  {vtranslate('LBL_DISCOUNT',$MODULE)} {if $ITEM_DISCOUNT_PERCENT_EDITABLE && $data.$discount_type eq 'percentage'} ({$data.$discount_percent}%) {else if $ITEM_DISCOUNT_AMOUNT_EDITABLE && $data.$discount_type eq 'amount'} ({$data.$discount_amount}) {else} (0) {/if} :
{assign var="DISCOUNT_TYPE" value="zero"} {if !empty($data.$discount_type)} {assign var="DISCOUNT_TYPE" value=$data.$discount_type} {/if}

{vtranslate('LBL_SET_DISCOUNT_FOR',$MODULE)} : {$data.$productTotal}

{if $ITEM_DISCOUNT_PERCENT_EDITABLE} {/if} {if $ITEM_DISCOUNT_AMOUNT_EDITABLE} {/if}
  {vtranslate('LBL_ZERO_DISCOUNT',$MODULE)}
  % {vtranslate('LBL_OF_PRICE',$MODULE)}  %
  {vtranslate('LBL_DIRECT_PRICE_REDUCTION',$MODULE)}
{vtranslate('LBL_TOTAL_AFTER_DISCOUNT',$MODULE)} :
{/if}
(+) {vtranslate('LBL_TAX',$MODULE)} :

{vtranslate('LBL_SET_TAX_FOR',$MODULE)} : {$data.$totalAfterDiscount}

{if count($data.taxes) > 0}
{foreach key=tax_row_no item=tax_data from=$data.taxes} {assign var="taxname" value=$tax_data.taxname|cat:"_percentage"|cat:$row_no} {assign var="tax_id_name" value="hidden_tax"|cat:$tax_row_no+1|cat:"_percentage"|cat:$row_no} {assign var="taxlabel" value=$tax_data.taxlabel|cat:"_percentage"|cat:$row_no} {assign var="popup_tax_rowname" value="popup_tax_row"|cat:$row_no} {/foreach}
  {$tax_data.taxlabel}  %
{/if}
{/if}
{if $data.$productTotal}{$data.$productTotal}{else}0{/if}
{if $ITEM_DISCOUNT_AMOUNT_EDITABLE || $ITEM_DISCOUNT_PERCENT_EDITABLE}
{if $data.$discountTotal}{$data.$discountTotal}{else}0{/if}
{if $data.$totalAfterDiscount}{$data.$totalAfterDiscount}{else}0{/if}
{/if}
{if $data.$taxTotal}{$data.$taxTotal}{else}0{/if}
{if $MARGIN_EDITABLE && $PURCHASE_COST_EDITABLE} {if $data.$margin}{$data.$margin}{else}0{/if} {/if} {if $data.$netPrice}{$data.$netPrice}{else}0{/if} {/strip}