Added myob fields to Products table

This commit is contained in:
Karl Cordes 2011-11-14 13:40:06 +11:00
parent 488e324be4
commit a6f9444661
6 changed files with 25 additions and 16 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE `products` ADD `item_code` VARCHAR( 255 ) NOT NULL ,
ADD `item_description` VARCHAR( 255 ) NOT NULL;

View file

@ -16,8 +16,8 @@ class Costing extends AppModel {
'LineItem' => array('className'=>'LineItem','foreignKey' => 'line_item_id' 'LineItem' => array('className'=>'LineItem','foreignKey' => 'line_item_id'
), ),
'PurchaseCurrency' => array('className' => 'Currency', 'foreignKey' => 'purchase_currency_id'), 'PurchaseCurrency' => array('className' => 'Currency', 'foreignKey' => 'purchase_currency_id', 'order'=>'PurchaseCurrency.name ASC'),
'SaleCurrency' => array('className' => 'Currency', 'foreignKey' => 'sale_currency_id') 'SaleCurrency' => array('className' => 'Currency', 'foreignKey' => 'sale_currency_id', 'order'=>'SaleCurrency.name ASC')

View file

@ -32,7 +32,7 @@ class Currency extends AppModel {
); );
var $order = "Currency.name ASC"; var $order = "name ASC";
} }
?> ?>

View file

@ -17,11 +17,14 @@ $('.ckeditor').ckeditor(config);
echo $form->input('title', array('class' => 'required', 'title'=>'Please Enter the Title for the Product')); echo $form->input('title', array('class' => 'required', 'title'=>'Please Enter the Title for the Product'));
echo $form->input('description', array('id' => 'description', 'class'=>'ckeditor')); echo $form->input('description', array('id' => 'description', 'class'=>'ckeditor'));
echo $form->input('item_code');
echo $form->input('item_description');
echo $form->input('notes'); echo $form->input('notes');
echo $html->image('calculator.png');
?> ?>

View file

@ -15,6 +15,11 @@ echo $javascript->link('edit_product');
echo $form->input('description'); echo $form->input('description');
echo $form->input('notes'); echo $form->input('notes');
echo $form->input('item_code');
echo $form->input('item_description');
?> ?>
</fieldset> </fieldset>
<?php echo $form->end(array('label' => 'Edit Product', 'class'=>'wymupdate'));?> <?php echo $form->end(array('label' => 'Edit Product', 'class'=>'wymupdate'));?>

View file

@ -21,18 +21,17 @@
<?php echo $product['Product']['description']; ?> <?php echo $product['Product']['description']; ?>
&nbsp; &nbsp;
</dd> </dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Item Code'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $product['Product']['item_code']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Item Decription'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $product['Product']['item_description']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Model Number'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $product['Product']['model_number']; ?>
&nbsp;
</dd>
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Model Number Format'); ?></dt>
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php echo $product['Product']['model_number_format']; ?>
&nbsp;
</dd>
</dl> </dl>
</div> </div>