<?php echo $javascript->link('autocomplete-customer'); ?>

<div class="customers form">

<?php echo $form->create('Customer', array('action'=>'add'));?>
	<fieldset>
 		<legend><?php __('Add Customer');?></legend>
	<?php
		
		echo $form->input('name', array('id'=>'customerName'));
		
                echo $form->input('country_name', array('default'=>'Australia'));
                echo $form->input('country_id', array('type'=>'hidden', 'value'=>1));

		echo $form->input('abn', array('label'=>'ABN', 'title' => 'The 11-digit Australian Business Number for the new Customer. Spaces or no spaces - it does not matter', 'div'=>array('id'=>'ABN')));
		
		echo $this->element('payment_terms_box');
		echo $form->input('discount_pricing_policies', array('label'=>'Discount and Pricing Policies'));
		echo '<div class="input select">';
		echo $form->label('Customer.customer_category_id', 'Customer Category');
		echo $form->select('customer_category_id', $customer_categories, 0, array('label'=>'Customer Category'), false);
		echo '</div>';
		echo $form->input('notes', array('label' => 'Notes about this Customer'));
		echo $form->input('url', array('label'=>'Website URL'));
		echo '<br><br>';
		
		 echo $form->end('Submit');
	?>
	

	</fieldset>


</div>

<div class="actions">
	<ul>
		<li><?php echo $html->link(__('List Customers', true), array('action'=>'index'));?></li>
		<li><?php echo $html->link(__('List Addresses', true), array('controller'=> 'addresses', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Address', true), array('controller'=> 'addresses', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Enquiries', true), array('controller'=> 'enquiries', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Enquiry', true), array('controller'=> 'enquiries', 'action'=>'add')); ?> </li>
	</ul>
</div>

<div id="dialog" title="Is this customer already in the database?">
	<p>Please confirm the customer you are adding is not one of these customers:</p>
        <ul id="similarCustList">
            
        </ul>
</div>