61 lines
2.8 KiB
PHP
Executable file
61 lines
2.8 KiB
PHP
Executable file
<?php echo $this->element('tipbox', array('tip' => "Tip: When adding or removing Contact/Address entry forms, removing the first contact/address form will remove all of the dynamically added forms.
|
|
<br><br>Also, don't submit blank Contacts or Addresses - it may cause validation to fail and you'll have to re-enter the data. Remove any Contacts/Address forms you don't need."));
|
|
?>
|
|
|
|
<div class="customers form">
|
|
|
|
<?php echo $form->create('Customer', array('action'=>'add'));?>
|
|
<fieldset>
|
|
<legend><?php __('Add Customer');?></legend>
|
|
<?php
|
|
//echo $form->input('name', array('label'=>'Company Name', 'title' => 'The Company Name. Eg. XYZ Business Pty Ltd'));
|
|
echo '<div class="input text">';
|
|
echo $form->label('Customer.name', 'Company Name');
|
|
echo $ajax->autoComplete('name', '/customers/completeCustomer');
|
|
echo "<br><br><span class=\"warning\">If the Customer you are adding appears automatically, it already exists in the ".$html->link('Customers Index', array('action' => 'index')). "<br>Do Not Add Duplicates.</span>";
|
|
echo '</div>';
|
|
echo $form->input('abn', array('label'=>'ABN', 'title' => 'The 11-digit Australian Business Number for the new Customer. Enter numbers only, no dashes or punctuation'));
|
|
|
|
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 '<br><br>';
|
|
?>
|
|
<div id="contacts0">
|
|
<? echo $ajax->link('Add A Contact to this New Customer', array('controller' => 'contacts', 'action' => 'add_another',0), array('update'=>'contacts0'));
|
|
echo $html->image('contact-new.png');
|
|
?>
|
|
</div>
|
|
|
|
<div id="addresses0">
|
|
<?
|
|
echo $ajax->link('Add an Address to this New Customer', array('controller' => 'addresses', 'action' => 'add_another',0), array('update'=>'addresses0')); ?>
|
|
<? echo $html->image('address-book-new.png'); ?>
|
|
</div>
|
|
|
|
<?
|
|
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>
|
|
|