|
Add New Item to Stock
|
|
04-27-2012, 07:48 AM
Post: #1
|
|||
|
|||
|
When I try to add an item, I capture the data in the form and submit it throws me this error:
Database Error : The item could not be added because Field 'lastcostupdate' doesn't have a default value Database SQL Failure : The SQL that was used to add the item failed was INSERT INTO stockmaster (stockid, description, longdescription, categoryid, units, mbflag, eoq, discontinued, controlled, serialised, perishable, volume, kgs, barcode, discountcategory, taxcatid, decimalplaces, shrinkfactor, pansize) VALUES ('1000', 'Test Part', 'Purchase Part Test', 'PLANT', 'each', 'B', '1', '0', '0', '0', '0', '1', '1', '1000', '', '1', '0', '0', '0') Someone could say that is what is wrong ? This is my form: Item Code: 1000 Part Description: TEST Part Description: PART TEST Imagen File: Category: Plant and Equipment Economi Order Quantity: 0 Packaged Volume: 0 Packaged Weight: 0 Units of Measure: 0 Assembly, kit, manufactured or service: Purchased Current or Obsolet: Current Batch, Serial or Lot Control: No Control Serialised: No Perishable: No Decimal Place for display Quantity: 0 Bar Code: 1000 Discount Category: Tax Category: Taxable Sypply Pan Size: 0 Shrinkage Factor: 0 Depresiation Type: Straight Line Annual Depresiation Percentege: Thanks for your help... |
|||
|
04-28-2012, 12:55 AM
Post: #2
|
|||
|
|||
|
RE: Add New Item to Stock
Hi,
Is it a new installed system? What is the version? Best regards! Exson |
|||
|
04-30-2012, 03:38 AM
Post: #3
|
|||
|
|||
| RE: Add New Item to Stock | |||
|
05-01-2012, 12:48 PM
Post: #4
|
|||
|
|||
|
RE: Add New Item to Stock
Problem is caused by the table stockmaster definition. The column lastcostupdate is set for a default value of NULL but it is also checked for not allowing null values and since it is not specified in the insert, bang zoom to the moon, the insert fails. Simplest fix is to remove the null value not allowed option from the field. This fixes the error (tested on my webERP v4.07.8).
ALTER TABLE `weberpdemo`.`stockmaster` MODIFY COLUMN `lastcostupdate` DATE; JC |
|||
|
05-04-2012, 11:19 AM
Post: #5
|
|||
|
|||
RE: Add New Item to Stock
(05-01-2012 12:48 PM)MTPubRadio Wrote: Problem is caused by the table stockmaster definition. The column lastcostupdate is set for a default value of NULL but it is also checked for not allowing null values and since it is not specified in the insert, bang zoom to the moon, the insert fails. Simplest fix is to remove the null value not allowed option from the field. This fixes the error (tested on my webERP v4.07.8). That fixed it. Thanks a lot MTPubRadio. |
|||
|
05-05-2012, 07:40 AM
Post: #6
|
|||
|
|||
|
RE: Add New Item to Stock
Will update the sql upgrade to default this field in future ... thanks for the report
Phil Daintree webERP Admin Logic Works Ltd http://www.logicworks.co.nz |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help




