Added Text String prices to Line Items
This commit is contained in:
parent
7e4f59f322
commit
66870227db
|
|
@ -13,10 +13,10 @@
|
|||
echo $form->input('LineItem.title');
|
||||
echo $form->input('LineItem.description');
|
||||
echo $form->input('LineItem.product_id', array('type'=>'hidden'));
|
||||
|
||||
echo $form->input('LineItem.has_text_prices', array('options' => array('1' => 'Yes', '0' => 'No')));
|
||||
?>
|
||||
<div id="noCosting">
|
||||
<?
|
||||
<?
|
||||
echo $form->input('gross_unit_price', array('class'=>'number_input quickpricing'));
|
||||
echo $form->input('discount_percent', array('class'=>'number_input quickpricing'));
|
||||
echo $form->input('discount_amount_unit', array('class'=>'number_input quickpricing'));
|
||||
|
|
@ -24,8 +24,16 @@
|
|||
echo $form->input('gross_price', array('class'=>'number_input quickpricing'));
|
||||
echo $form->input('discount_amount_total', array('class'=>'number_input quickpricing'));
|
||||
echo $form->input('net_price', array('class'=>'number_input quickpricing'));
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="textPrices">
|
||||
<?
|
||||
echo $form->input('unit_price_string');
|
||||
echo $form->input('gross_price_string');
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?
|
||||
echo $form->end();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -33,24 +33,39 @@
|
|||
<?=$li['description'];?>
|
||||
</td>
|
||||
<td width="<?=$colWidths['unit'];?>" align="center" valign="top">
|
||||
|
||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['unit_price_string'];
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
discount<br>
|
||||
(-<?=$number->currency($li['discount_amount_unit'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</td>
|
||||
<td width="<?=$colWidths['total'];?>" align="center" valign="top">
|
||||
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['gross_price_string'];
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
discount*<br>
|
||||
(<?=$number->currency($li['discount_amount_total'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -46,24 +46,39 @@
|
|||
<?=$li['description'];?>
|
||||
</td>
|
||||
<td class="price">
|
||||
|
||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['unit_price_string'];
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
discount<br>
|
||||
(-<?=$number->currency($li['discount_amount_unit'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<? endif;?>
|
||||
</td>
|
||||
<td class="price">
|
||||
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<?
|
||||
if($li['has_text_prices']):
|
||||
echo $li['gross_price_string'];
|
||||
?>
|
||||
<?
|
||||
else:
|
||||
?>
|
||||
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
||||
<? if($li['discount_percent']):?>
|
||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||
discount<br>
|
||||
<?=$number->currency($li['discount_amount_total'], $currencyCode);?>)<br>
|
||||
<?=$number->currency($li['discount_amount_total'], $currencyCode);?>)<br>
|
||||
=<br>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</td>
|
||||
<td id="<?=$li['id'];?>">
|
||||
|
|
@ -104,7 +119,7 @@
|
|||
else {
|
||||
echo $currencySymbol.'TBA';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</td>
|
||||
<td></td>
|
||||
|
|
|
|||
|
|
@ -211,6 +211,9 @@ $(function() {
|
|||
$("#productDetails").hide();
|
||||
|
||||
$('#LineItemDescription').ckeditor(config);
|
||||
|
||||
showHideTextPrices();
|
||||
|
||||
$( "#addLineItemModal" ).dialog('open');
|
||||
|
||||
});
|
||||
|
|
@ -233,6 +236,7 @@ $(function() {
|
|||
$("#editLineItemModal").html(data);
|
||||
$("#productDetails").hide();
|
||||
$('#LineItemDescription').ckeditor(config);
|
||||
showHideTextPrices();
|
||||
$( "#editLineItemModal" ).dialog('open');
|
||||
|
||||
});
|
||||
|
|
@ -272,6 +276,10 @@ $(function() {
|
|||
$('.page').ckeditor(config);
|
||||
|
||||
|
||||
$("#LineItemHasTextPrices").live('change', function() {
|
||||
showHideTextPrices();
|
||||
});
|
||||
|
||||
|
||||
//Remove this Page
|
||||
$(".removePage").live('click',function() {
|
||||
|
|
@ -444,6 +452,18 @@ $('.generateCommercialComments').live('click', function(event) {
|
|||
|
||||
});
|
||||
|
||||
function showHideTextPrices() {
|
||||
if( $('#LineItemHasTextPrices').val() == 1) {
|
||||
$("#noCosting").hide();
|
||||
$("#noCosting").find('input').val('');
|
||||
$("#textPrices").show();
|
||||
}
|
||||
else {
|
||||
$("#noCosting").show();
|
||||
$("#textPrices").hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function updateTextFields() {
|
||||
$('#shippingDetails').ckeditor(function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue