2010-01-30 23:57:51 -08:00
<?php echo $javascript->link('add_costing'); ?>
2009-11-18 15:23:21 -08:00
2010-01-30 23:57:51 -08:00
<div class="costings form">
2010-02-04 08:30:49 -08:00
<?php echo $form->create('Costing', array('class'=>'cmxform'));?>
2010-03-30 21:09:27 -07:00
<?php if(isset($product)) {
$form->input('product_id', array('type'=>'hidden', 'value'=>$product['Product']['id']));
2013-07-15 03:27:28 -07:00
$title = $product['Product']['title'];
2010-03-30 21:09:27 -07:00
}
elseif(isset($line_item)) {
$form->input('line_item_id', array('type'=>'hidden', 'value'=>$line_item['LineItem']['id']));
2013-07-15 03:27:28 -07:00
$title = $line_tem['LineItem']['title'];
2013-05-05 01:42:35 -07:00
print_r($line_item);
2013-07-15 03:27:28 -07:00
2010-03-30 21:09:27 -07:00
}
?>
2013-07-15 03:27:28 -07:00
<h2>Add Costing to: <?=$title ?></h2>
<fieldset>
2010-02-04 08:30:49 -08:00
<legend>Quantity, Unit price, Packing costs</legend>
<?php
2010-03-30 21:09:27 -07:00
2010-02-04 08:30:49 -08:00
echo $form->input('purchase_currency_id');
echo $form->input('sale_currency_id', array('default'=>2));
echo $form->input('quantity');
echo $form->input('unit_cost_price', array('label'=>'Unit Cost Price<span class="purchaseCurrency"></span>'));
echo $form->input('our_discount_percent');
echo $form->input('packing', array('label'=>'Supplier packing cost<span class="purchaseCurrency"></span>'));
2010-02-04 17:43:42 -08:00
echo $form->input('FobCountryOfExport', array('class'=>'disabled', 'readonly'=>'readonly', 'label'=>'FOB Country of Export<span class="purchaseCurrency"></span>'));
2010-02-04 08:30:49 -08:00
?>
</fieldset>
<fieldset>
<legend>Exchange Rate / Conversion</legend>
<?
echo $form->input('exchange_rate', array('label'=>'Exchange Rate <span id="exchangeConversion"></span>'));
?>
2010-02-04 17:43:42 -08:00
<? echo $form->input('fob_sale_currency', array('class'=>'disabled', 'readonly'=>'readonly', 'label'=>'Cost<span class="saleCurrency"></span>')); ?>
2010-02-04 08:30:49 -08:00
</fieldset>
2010-02-04 17:43:42 -08:00
2010-02-04 08:30:49 -08:00
<fieldset>
<legend>Customs and Duty</legend>
<?
echo $form->input('duty_percent', array('label'=>'Duty Percent (%)<span id="dutyAmount" class="rightHandLabel"></span>'));
echo $form->input('customs');
?>
</fieldset>
<fieldset>
<legend>Shipping Details</legend>
<?
echo $form->input('shipping_weight', array('label'=>'Shipping Weight (kilograms)'));
echo $form->input('shipping_cost', array('label'=>'Shipping Cost<span class="saleCurrency"></span>'));
?>
</fieldset>
<fieldset>
<legend>Finance, Misc Costs</legend>
<?
2010-02-04 17:43:42 -08:00
echo $form->input('finance_percent', array('label'=>'Finance Percent (%)<span id="financeAmount" class="rightHandLabel"></span>'));
2010-02-04 08:30:49 -08:00
echo $form->input('misc_costs', array('label'=>'Misc Costs<span class="saleCurrency"></span>'));
?>
</fieldset>
2010-02-04 17:43:42 -08:00
<fieldset>
<legend>Total Landed Cost</legend>
<?
echo $form->input('total_landed_cost', array('class'=>'disabled', 'readonly'=>'readonly','label'=>'Total Landed Cost<span class="saleCurrency"></span>'));
?>
</fieldset>
<fieldset>
<legend>Selling Prices, Gross Profit</legend>
<?
echo $form->input('gross_sell_price', array('label'=>'Gross Selling Price<span class="saleCurrency"></span>'));
echo $form->input('gross_gp_prior_to_discount', array('class'=>'disabled', 'readonly'=>'readonly', 'label'=>'Gross GP prior to discount<span class="saleCurrency"></span>'));
echo $form->input('sale_discount_percent', array('label'=>'Discount/Commission (%)<span id="saleDiscountAmount" class="rightHandLabel"></span> '));
echo $form->input('net_sell_price', array('class'=>'disabled', 'readonly'=>'readonly', 'label'=>'Net Selling Price<span class="saleCurrency"></span>'));
echo $form->input('net_gp_amount', array('class'=>'disabled', 'readonly'=>'readonly', 'label'=>'Net GP Amount<span class="saleCurrency"></span>'));
echo $form->input('net_gp_percent', array('class'=>'disabled', 'readonly'=>'readonly', 'label'=>'Net GP Percent (%)'));
echo $form->input('gross_sell_price_each', array('class'=>'disabled', 'readonly'=>'readonly', 'label'=>'Gross Sell Price Each<span class="saleCurrency"></span>'));
echo $form->input('net_sell_price_each', array('class'=>'disabled','readonly'=>'readonly', 'label'=>'Net Sell Price Each<span class="saleCurrency"></span>'));
?>
</fieldset>
2010-02-04 08:30:49 -08:00
<?
?>
<?php
echo $form->input('duty_amount', array('type'=>'hidden'));
echo $form->input('finance_amount', array('type'=>'hidden'));
2010-02-04 17:43:42 -08:00
echo $form->input('sale_discount_amount', array('type'=>'hidden'));
2010-02-04 08:30:49 -08:00
echo $form->end('Submit');?>
2009-11-18 15:23:21 -08:00
</div>
2012-03-02 13:01:31 -08:00