Erp100论坛's Archiver

zanmei2046 发表于 2008-8-29 10:21

compiere 由请购单创建采购定单出错

由请购单创建采购定单出错,帮忙看一下   附件[img]http://bbs.erp100.com/images/attachicons/image.gif[/img] [url=http://bbs.erp100.com/attachment.php?aid=10752&k=395ba2c72cb64cf784a6a1420afa8909&t=1219976203&nothumb=yes][color=#0000ff]从请购单创建采购订单.bmp[/color][/url] [i](279.05 KB)[/i] 2008-4-14 20:01
[img]http://bbs.erp100.com/attachments/day_080414/20080414_166d67d55bc0893ef178GbEiZ3akoqid.bmp[/img]

zanmei2046 发表于 2008-8-30 23:20

郁闷.怎么没人解答

郁闷了,怎么没人帮忙解答呢?版主,你也不能帮忙看一下吗?
  :/zhem

pshen 发表于 2008-9-1 21:22

有后台的错误信息吗?

pshen 发表于 2008-9-1 21:24

相关的信息都全了吗?
Price List, 供应商地址,...

zanmei2046 发表于 2008-9-2 10:05

请看下面的信息

*** 2008-09-02 10:11:02.906 Compiere Log (CLogConsole) ***
10:11:02.906 Compiere.startup: Compiere(r) Release 3.0.2_2008-04-07 - Smart ERP
& CRM - (c) 1999-2008 Compiere (r); Implementation: 3.0.2 20080407-1758 - Compie
re China
10:11:02.906 Compiere.startup: Client zanmei/: G:\Compiere2 - Java
HotSpot(TM) Client VM 1.5.0_15-b04 - Windows 2003 5.2 Service Pack 2
10:11:04.281 Ini.loadProperties: C:\Documents and Settings\Administrator\Compier
e.properties #27
-----------> CConnection.getStatusEjbStub: jnp://zanmei:1099
- javax.naming.CommunicationException: Receive timed out [Root exception is jav
a.net.SocketTimeoutException: Receive timed out]
- {java.naming.provider.url=jnp://zanmei:1099, java.naming.factory.initial=org.
jnp.interfaces.NamingContextFactory, jnp.discoveryTimeout=2000, jnp.timeout=2000
, java.naming.factory.url.pkgs=org.jboss.naming.client, jnp.sotimeout=2000}
===========> DB.executeUpdate: INSERT INTO C_Order (AD_Client_ID,AD_Org_ID,AD_Us
er_ID,Bill_BPartner_ID,Bill_Location_ID,Bill_User_ID,C_BPartner_ID,C_BPartner_Lo
cation_ID,C_Currency_ID,C_DocTypeTarget_ID,C_DocType_ID,C_Order_ID,C_PaymentTerm
_ID,ChargeAmt,Created,CreatedBy,DateAcct,DateOrdered,DatePromised,DeliveryRule,D
eliveryViaRule,Description,DocAction,DocStatus,DocumentNo,FreightAmt,FreightCost
Rule,GrandTotal,InvoiceRule,IsActive,IsApproved,IsCreditApproved,IsDelivered,IsD
iscountPrinted,IsDropShip,IsInvoiced,IsPrinted,IsReturnTrx,IsSOTrx,IsSelected,Is
SelfService,IsTaxIncluded,IsTransferred,M_PriceList_ID,M_Warehouse_ID,PaymentRul
e,Posted,PriorityRule,Processed,Processing,SendEMail,TotalLines,Updated,UpdatedB
y) VALUES (11,11,103,114,109,103,114,109,100,126,0,1000007,106,0,TO_DATE('2008-0
9-02 10:11:51','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2008-09-02','YYYY-MM-DD'),T
O_DATE('2008-09-02','YYYY-MM-DD'),TO_DATE('2008-09-02','YYYY-MM-DD'),'A','P','Re
quisition: 900001','PR','DR','800005',0,'I',0,'I','Y','N','N','N','N','N','N','N
','N','N','N','N','N','N',101,103,'P','N','5','N','N','N',0,TO_DATE('2008-09-02
10:11:51','YYYY-MM-DD HH24:MI:SS'),100) [SvrProcess_1220321511750] [11]
java.sql.SQLException: ORA-01400: cannot insert NULL into ("COMPIERE"."C_ORDER".
"SALESREP_ID")
; State=23000; ErrorCode=1400
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:125)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.
java:181)
        at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedS
tatement.java:543)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1028)
        at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatem
ent.java:3753)
        at oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate
(OraclePreparedStatement.java:8829)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
aredStatement.java:2886)
        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:2960)
        at org.compiere.util.CPreparedStatement.executeUpdate(CPreparedStatement
.java:215)
        at org.compiere.util.DB.executeUpdate(DB.java:840)
        at org.compiere.util.DB.executeUpdate(DB.java:747)
        at org.compiere.framework.PO.saveNewInsertSQL(PO.java:2770)
        at org.compiere.framework.PO.saveNew(PO.java:2619)
        at org.compiere.framework.PO.save(PO.java:2216)
        at org.compiere.process.RequisitionPOCreate.newOrder(RequisitionPOCreate
.java:297)
        at org.compiere.process.RequisitionPOCreate.newLine(RequisitionPOCreate.
java:368)
        at org.compiere.process.RequisitionPOCreate.process(RequisitionPOCreate.
java:261)
        at org.compiere.process.RequisitionPOCreate.doIt(RequisitionPOCreate.jav
a:121)
        at org.compiere.process.SvrProcess.startProcess(SvrProcess.java:91)
        at org.compiere.apps.ProcessCtl.startProcess(ProcessCtl.java:483)
        at org.compiere.apps.ProcessCtl.run(ProcessCtl.java:251)

-----------> DB.saveError: DBExecuteError - ORA-01400: cannot insert NULL into (
"COMPIERE"."C_ORDER"."SALESREP_ID")
[11]
-----------> MOrder.saveNewInsertSQL: [SvrProcess_1220321511750]Not inserted - C
_Order [11]
-----------> RequisitionPOCreate.startProcess: Cannot save Order [11]

[[i] 本帖最后由 zanmei2046 于 2008-9-2 10:13 编辑 [/i]]

zanmei2046 发表于 2008-9-2 10:06

版本是compiere3.0.2

版本是compiere3.0.2

紫髯 发表于 2008-9-2 12:02

看不懂!

herome 发表于 2008-9-2 14:14

看SQL是因为请购单中没有选择销售代表,导致采购单的销售代表为null导致错误

不过要看下请购单中是否选择了销售代表?如果选择了,请核查下生成采购单的过程是否给销售代表ID负值了。

zanmei2046 发表于 2008-9-2 16:57

感谢herome的帮忙

谢谢herome
问题解决了.数据库中salesrep_id字段是不允许为空,而在申购时又没有这个字段
于是我把数据库中这个字段改为允许为空,就能成功生成采购定单了

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2007 Comsenz Inc.