Added bill_to and ship_to to Documents [Invoices OAs]
This commit is contained in:
parent
dae68692fa
commit
7d22714d9d
|
|
@ -311,6 +311,7 @@ class DocumentsController extends AppController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function pdf($id = null) {
|
function pdf($id = null) {
|
||||||
//Configure::write('debug',0);
|
//Configure::write('debug',0);
|
||||||
if(!$id) {
|
if(!$id) {
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,9 @@ $this->element('pdf_output', array('pdfdoc'=>$pdfdoc));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//window.location.replace("/documents/view/<?=$document['Document']['id']?>");
|
window.location.replace("/documents/view/<?=$document['Document']['id']?>");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<? debug($document); ?>
|
<? //debug($document); ?>
|
||||||
<? //debug($enquiry); ?>
|
<? //debug($enquiry); ?>
|
||||||
|
|
@ -15,6 +15,10 @@
|
||||||
echo $form->input('Invoice.currency_id');
|
echo $form->input('Invoice.currency_id');
|
||||||
echo $form->input('Invoice.issue_date');
|
echo $form->input('Invoice.issue_date');
|
||||||
echo $form->input('Invoice.due_date');
|
echo $form->input('Invoice.due_date');
|
||||||
|
|
||||||
|
echo $form->input('Document.bill_to');
|
||||||
|
echo $form->input('Document.ship_to');
|
||||||
|
|
||||||
echo $form->input('Invoice.ship_via');
|
echo $form->input('Invoice.ship_via');
|
||||||
echo $form->input('Invoice.fob');
|
echo $form->input('Invoice.fob');
|
||||||
echo $form->input('Document.shipping_details', array('id'=>'shippingDetails'));
|
echo $form->input('Document.shipping_details', array('id'=>'shippingDetails'));
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@
|
||||||
echo $form->input('OrderAcknowledgement.currency_id');
|
echo $form->input('OrderAcknowledgement.currency_id');
|
||||||
echo $form->input('OrderAcknowledgement.issue_date');
|
echo $form->input('OrderAcknowledgement.issue_date');
|
||||||
|
|
||||||
|
echo $form->input('Document.bill_to');
|
||||||
|
echo $form->input('Document.ship_to');
|
||||||
|
|
||||||
|
|
||||||
echo $form->input('OrderAcknowledgement.ship_via');
|
echo $form->input('OrderAcknowledgement.ship_via');
|
||||||
echo $form->input('OrderAcknowledgement.fob');
|
echo $form->input('OrderAcknowledgement.fob');
|
||||||
echo $form->input('OrderAcknowledgement.estimated_delivery');
|
echo $form->input('OrderAcknowledgement.estimated_delivery');
|
||||||
|
|
|
||||||
|
|
@ -25,23 +25,11 @@ $col3width = '30%';
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: <?=$col1width?>; border-top: 1px solid black; border-left: 1px solid black; border-bottom: 1px solid black">
|
<td style="width: <?=$col1width?>; border-top: 1px solid black; border-left: 1px solid black; border-bottom: 1px solid black;">
|
||||||
<span style="font-weight: bold;"><?=$enquiry['Customer']['name'];?></span><br>
|
<?=$document['Document']['bill_to'];?>
|
||||||
<? if(!empty($enquiry['BillingAddress']['id'])):?>
|
|
||||||
<?=$enquiry['BillingAddress']['address'];?><br>
|
|
||||||
<?=$enquiry['BillingAddress']['city'];?><br>
|
|
||||||
<?=$enquiry['BillingAddress']['postcode'];?>
|
|
||||||
<?=strtoupper($states[$enquiry['BillingAddress']['state_id']]);?><br>
|
|
||||||
<? endif;?>
|
|
||||||
</td>
|
</td>
|
||||||
<td style="width: <?=$col1width?>; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; border-bottom: 1px solid black">
|
<td style="width: <?=$col1width?>; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; border-bottom: 1px solid black;">
|
||||||
<span style="font-weight: bold;"><?=$enquiry['Customer']['name'];?></span><br>
|
<?=$document['Document']['ship_to'];?>
|
||||||
<? if(!empty($enquiry['ShippingAddress']['id'])):?>
|
|
||||||
<?=$enquiry['ShippingAddress']['address'];?><br>
|
|
||||||
<?=$enquiry['ShippingAddress']['city'];?><br>
|
|
||||||
<?=$enquiry['ShippingAddress']['postcode'];?>
|
|
||||||
<?=strtoupper($states[$enquiry['ShippingAddress']['state_id']]);?><br>
|
|
||||||
<? endif; ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -300,6 +300,9 @@ $(function() {
|
||||||
//Invoice View
|
//Invoice View
|
||||||
$('#shippingDetails').ckeditor(config);
|
$('#shippingDetails').ckeditor(config);
|
||||||
|
|
||||||
|
$("#DocumentBillTo").ckeditor(config);
|
||||||
|
$("#DocumentShipTo").ckeditor(config);
|
||||||
|
|
||||||
$("#saveInvoiceButton").click(function() {
|
$("#saveInvoiceButton").click(function() {
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -334,6 +337,12 @@ $(function() {
|
||||||
this.updateElement();
|
this.updateElement();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#DocumentBillTo").ckeditor(function() {
|
||||||
|
this.updateElement();
|
||||||
|
});
|
||||||
|
$("#DocumentShipTo").ckeditor(function() {
|
||||||
|
this.updateElement();
|
||||||
|
});
|
||||||
var invoiceDetails = $('#DocumentEditForm').find('input,select,textarea');
|
var invoiceDetails = $('#DocumentEditForm').find('input,select,textarea');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue