Added Text String prices to Line Items
This commit is contained in:
parent
7e4f59f322
commit
66870227db
|
|
@ -13,7 +13,7 @@
|
||||||
echo $form->input('LineItem.title');
|
echo $form->input('LineItem.title');
|
||||||
echo $form->input('LineItem.description');
|
echo $form->input('LineItem.description');
|
||||||
echo $form->input('LineItem.product_id', array('type'=>'hidden'));
|
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">
|
<div id="noCosting">
|
||||||
<?
|
<?
|
||||||
|
|
@ -26,6 +26,14 @@
|
||||||
echo $form->input('net_price', array('class'=>'number_input quickpricing'));
|
echo $form->input('net_price', array('class'=>'number_input quickpricing'));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="textPrices">
|
||||||
|
<?
|
||||||
|
echo $form->input('unit_price_string');
|
||||||
|
echo $form->input('gross_price_string');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?
|
<?
|
||||||
echo $form->end();
|
echo $form->end();
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,13 @@
|
||||||
<?=$li['description'];?>
|
<?=$li['description'];?>
|
||||||
</td>
|
</td>
|
||||||
<td width="<?=$colWidths['unit'];?>" align="center" valign="top">
|
<td width="<?=$colWidths['unit'];?>" align="center" valign="top">
|
||||||
|
<?
|
||||||
|
if($li['has_text_prices']):
|
||||||
|
echo $li['unit_price_string'];
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
else:
|
||||||
|
?>
|
||||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||||
<? if($li['discount_percent']):?>
|
<? if($li['discount_percent']):?>
|
||||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||||
|
|
@ -42,8 +48,16 @@
|
||||||
=<br>
|
=<br>
|
||||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||||
<?endif;?>
|
<?endif;?>
|
||||||
|
<?endif;?>
|
||||||
</td>
|
</td>
|
||||||
<td width="<?=$colWidths['total'];?>" align="center" valign="top">
|
<td width="<?=$colWidths['total'];?>" align="center" valign="top">
|
||||||
|
<?
|
||||||
|
if($li['has_text_prices']):
|
||||||
|
echo $li['gross_price_string'];
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
else:
|
||||||
|
?>
|
||||||
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
||||||
<? if($li['discount_percent']):?>
|
<? if($li['discount_percent']):?>
|
||||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||||
|
|
@ -52,6 +66,7 @@
|
||||||
=<br>
|
=<br>
|
||||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||||
<?endif;?>
|
<?endif;?>
|
||||||
|
<?endif;?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?endforeach;?>
|
<?endforeach;?>
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,13 @@
|
||||||
<?=$li['description'];?>
|
<?=$li['description'];?>
|
||||||
</td>
|
</td>
|
||||||
<td class="price">
|
<td class="price">
|
||||||
|
<?
|
||||||
|
if($li['has_text_prices']):
|
||||||
|
echo $li['unit_price_string'];
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
else:
|
||||||
|
?>
|
||||||
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
<?=$number->currency($li['gross_unit_price'], $currencyCode);?>
|
||||||
<? if($li['discount_percent']):?>
|
<? if($li['discount_percent']):?>
|
||||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||||
|
|
@ -55,8 +61,16 @@
|
||||||
=<br>
|
=<br>
|
||||||
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
<?=$number->currency($li['net_unit_price'], $currencyCode);?>
|
||||||
<?endif;?>
|
<?endif;?>
|
||||||
|
<? endif;?>
|
||||||
</td>
|
</td>
|
||||||
<td class="price">
|
<td class="price">
|
||||||
|
<?
|
||||||
|
if($li['has_text_prices']):
|
||||||
|
echo $li['gross_price_string'];
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
else:
|
||||||
|
?>
|
||||||
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
<?=$number->currency($li['gross_price'], $currencyCode);?>
|
||||||
<? if($li['discount_percent']):?>
|
<? if($li['discount_percent']):?>
|
||||||
<br>less<br><?=$li['discount_percent']?>%<br>
|
<br>less<br><?=$li['discount_percent']?>%<br>
|
||||||
|
|
@ -65,6 +79,7 @@
|
||||||
=<br>
|
=<br>
|
||||||
<?=$number->currency($li['net_price'], $currencyCode);?>
|
<?=$number->currency($li['net_price'], $currencyCode);?>
|
||||||
<?endif;?>
|
<?endif;?>
|
||||||
|
<?endif;?>
|
||||||
</td>
|
</td>
|
||||||
<td id="<?=$li['id'];?>">
|
<td id="<?=$li['id'];?>">
|
||||||
<button class="editLineItem">Edit</button><br>
|
<button class="editLineItem">Edit</button><br>
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,9 @@ $(function() {
|
||||||
$("#productDetails").hide();
|
$("#productDetails").hide();
|
||||||
|
|
||||||
$('#LineItemDescription').ckeditor(config);
|
$('#LineItemDescription').ckeditor(config);
|
||||||
|
|
||||||
|
showHideTextPrices();
|
||||||
|
|
||||||
$( "#addLineItemModal" ).dialog('open');
|
$( "#addLineItemModal" ).dialog('open');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -233,6 +236,7 @@ $(function() {
|
||||||
$("#editLineItemModal").html(data);
|
$("#editLineItemModal").html(data);
|
||||||
$("#productDetails").hide();
|
$("#productDetails").hide();
|
||||||
$('#LineItemDescription').ckeditor(config);
|
$('#LineItemDescription').ckeditor(config);
|
||||||
|
showHideTextPrices();
|
||||||
$( "#editLineItemModal" ).dialog('open');
|
$( "#editLineItemModal" ).dialog('open');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -272,6 +276,10 @@ $(function() {
|
||||||
$('.page').ckeditor(config);
|
$('.page').ckeditor(config);
|
||||||
|
|
||||||
|
|
||||||
|
$("#LineItemHasTextPrices").live('change', function() {
|
||||||
|
showHideTextPrices();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
//Remove this Page
|
//Remove this Page
|
||||||
$(".removePage").live('click',function() {
|
$(".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() {
|
function updateTextFields() {
|
||||||
$('#shippingDetails').ckeditor(function() {
|
$('#shippingDetails').ckeditor(function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue