監(jiān)理公司管理系統(tǒng) | 工程企業(yè)管理系統(tǒng) | OA系統(tǒng) | ERP系統(tǒng) | 造價咨詢管理系統(tǒng) | 工程設(shè)計管理系統(tǒng) | 甲方項目管理系統(tǒng) | 簽約案例 | 客戶案例 | 在線試用
X 關(guān)閉

ERP系統(tǒng)二次開發(fā)

當(dāng)前位置:工程項目OA系統(tǒng) > ERP系統(tǒng) > ERP設(shè)計運用 > ERP系統(tǒng)二次開發(fā)

ERP系統(tǒng)二次開發(fā)

申請免費試用、咨詢電話:400-8352-114

  對于ERP實施顧問二次開發(fā)是最熟悉不過了,對實施國內(nèi)ERP軟件的顧問能做自己做一點二次開發(fā)那就更好不過了,如果你不會懂?dāng)?shù)據(jù)庫,不會做簡單的二次開發(fā),你會發(fā)現(xiàn)實施一個項目很困難,解決問題那就更加困難了!ERP軟件的源代碼都是軟件公司控制,我們不可能得到或修改。那么我們常說的二次開發(fā)都有那些呢?

  1、數(shù)據(jù)庫的開發(fā),就是利用sql server里的觸發(fā)器對數(shù)據(jù)增加,修改,刪除的時候做一些開發(fā)。

  2、ERP軟件自帶的單據(jù)自定義功能,報表功能。這個我相信大家都用的很熟,這里就不寫了!

  3、利用ERP軟件開放的接口進(jìn)行二次開發(fā)。如泛普開放的:憑證,基礎(chǔ)數(shù)據(jù),物流單據(jù)。

  4、我覺得是最沒有辦法的選擇。就是外掛,對數(shù)據(jù)庫直接進(jìn)行讀寫操作。

財務(wù).png

  注:以下sql需要大家自己測試!

  在這里我要和大家重點討論數(shù)據(jù)據(jù)觸發(fā)器的開發(fā):

  問題:我們需要在物料基礎(chǔ)資料里加一個自定義項“即時庫存”,那么我們怎么樣才能把即時庫存查詢里的數(shù)據(jù)寫到這里呢?很簡單,我們只需要在表即時庫存表里如:ICInventory加一個觸發(fā)器就可以解決。以泛普為例:

  CREATE TRIGGER stockqty ON [dbo].[CurrentStock]

  FOR insert ,UPDATE

  AS

  DECLARE

  @str1 varchar(40),

  @fqty numeric(15,6),

  @fqty1 numeric(15,6)

  select @str1=cinvcode from Inserted

  select @fqty1=sum(t20.iQuantity) from Currentstock t20 where t20.cInvCode=@str1

  and t20.cWhCode<='60' group by t20.cinvcode

  select @fqty=isnull(cInvDefine14,0) from Inventory where cinvcode =@str1

  if @fqty<>@fqty1

  update Inventory

  set cInvDefine14=@fqty1

  where cinvcode =@str1

  泛普也一樣表改一下,都一樣!

  問題:

  問題描述:

  在銷售發(fā)票自動傳遞到應(yīng)收款系統(tǒng)時,對應(yīng)的應(yīng)收款日期為,銷售發(fā)票日期。而客戶的需求確是銷售出庫的日期

  問題觖決:

  在收款計劃表t_RP_RPDetail數(shù)據(jù)新增的時候,加入一觸發(fā)器:

  CREATE TRIGGER t_rp_rpdetail_insert1 ON t_rp_rpdetail --###

  FOR INSERT

  NOT FOR REPLICATION

  AS

  DECLARE @Next int,

  @insert int,

  @fbillno varchar(30),

  @fdate datetime

  if @@Rowcount = 0

  return

  --set @TableName = 't_rp_rpdetail' --###

  SELECT @Next =forgid

  FROM Inserted

  select @fbillno=FNumber

  from t_RP_Contact

  where FID=@next

  select @insert=FOutStockInterID

  from ICSale

  where FBillNo=@fbillno

  select @fdate =FDate

  from ICStockBill

  where finterid=@insert

  if @fdate is not null

  begin

  update t_rp_contact set FRPDate=@fdate from t_rp_contact where fid=@next

  update t_RP_RPDetail set fdate=@fdate from t_RP_RPDetail where forgid=@next

  end

  問題:出庫單自動帶出單價。

  CREATE TRIGGER icstockinsert ON [dbo].[ICStockBill]

  FOR INSERT, UPDATE

  AS

  DECLARE @kinterid int,@kentryid int,@kitemid int,@kqty decimal(28,10),@kBatchNo varchar(200),

  @kprice as decimal(28,10),@ktrantype as int

  select @ktrantype=ftrantype, @kinterid=finterid

  from Inserted

  if @ktrantype in (21,24,28,29,41)

  begin

  update icstockbillentry set

  Fauxprice=isnull(( select top 1 fprice from

  icstockbill t10 inner join icstockbillentry t20 on t10.finterid=t20.finterid

  where t10.ftrantype in (1,2) and t20.fitemid=t1.fitemid and t20.fbatchno=t1.fbatchno

  order by t10.fdate),0)

  from icstockbillentry t1

  where t1.finterid=@kinterid and fauxprice=0

  update icstockbillentry set

  famount=Fauxprice*fqty

  from icstockbillentry t1

  where t1.finterid=@kinterid and famount=0

  end

發(fā)布:2007-02-27 14:10    來源:泛普軟件    [打印此頁]    [關(guān)閉]

相關(guān)欄目

ERP系統(tǒng)設(shè)計 ERP系統(tǒng)開發(fā) ERP需求調(diào)研 ERP系統(tǒng)實施 ERP系統(tǒng)培訓(xùn) ERP解決方案 ERP售后服務(wù) ERP系統(tǒng)免費下載 ERP系統(tǒng)破解 ERP系統(tǒng)二次開發(fā) ERP系統(tǒng)怎么用 ERP是什么意思 行業(yè)動態(tài) 規(guī)劃選型 技術(shù)文章