Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add New Item to Stock
04-27-2012, 07:48 AM,
#1
Bug  Add New Item to Stock
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...
Reply
04-28-2012, 12:55 AM,
#2
RE: Add New Item to Stock
Hi,
Is it a new installed system? What is the version?

Best regards!
Exson
Reply
04-30-2012, 03:38 AM,
#3
RE: Add New Item to Stock
(04-28-2012, 12:55 AM)Exsonqu_Qu Wrote: Hi,
Is it a new installed system? What is the version?

Best regards!
Exson

Hi Exson

Yes it is a new installed system, the version is webERP v4.07.7

Best regards!
Dragunmx
Reply
05-01-2012, 12:48 PM,
#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
Reply
05-04-2012, 11:19 AM,
#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).

ALTER TABLE `weberpdemo`.`stockmaster` MODIFY COLUMN `lastcostupdate` DATE;

JC

That fixed it. Thanks a lot MTPubRadio.
Reply
05-05-2012, 07:40 AM,
#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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)