понедељак, 3. јануар 2011.

Adding new table in Adempiere 3.1.0

Customisation of Adempiere 3.1.0 is very easy, I was creating new table
CREATE TABLE "XX_MATERIAL"
( "AD_CLIENT_ID" NUMBER(10,0),
"AD_ORG_ID" NUMBER(10,0),
"ISACTIVE" CHAR(1),
"CREATED" DATE,
"CREATEDBY" NUMBER(10,0),
"UPDATED" DATE,
"UPDATEDBY" NUMBER(10,0),
"XX_MATERIAL_ID" NUMBER(10,0),
"MATNR" NUMBER(10,2),
"COLORNR" NUMBER(10,2),
"NAME" VARCHAR2(100),
"NAMESHORT" VARCHAR2(100),
CONSTRAINT "XX_MATERIAL_PK" PRIMARY KEY ("XX_MATERIAL_ID") ENABLE
)
/


CREATE OR REPLACE TRIGGER "BI_XX_MATERIAL"
before insert on "XX_MATERIAL"
for each row
begin
if :NEW."XX_MATERIAL_ID" is null then
select "XX_MATERIAL_SEQ".nextval into :NEW."XX_MATERIAL_ID" from dual;
end if;
end;

/
ALTER TRIGGER "BI_XX_MATERIAL" ENABLE
/
from examples on:
http://www.adempiere.com/index.php/NewWindow
and try to integrated this new table into Adempiere. This is one way, when Adempiere is install on computer, so can be customised by Administrator, other way is descibe on link above, change from trunk, from source code, include
1)Creating new table(s)
2)Dump new Adempiere.dmp database file with new creating tables
3)Creating Persistence objects with all new tables with GenerateModel.java code
4)building all code with new classes
This is 1 way, manualy customisation
Fig 1: Creating new window



Fig 1.1 Acces level and role, users who can modify data from new created table XX_MATERIAL


Fig 1.2 Fields from table XX_MATERIAL


Fig 2: MENU need call New Window created from XX_MATERIAL, I was placed into assets, could be in other hierarchy, assets can be extend and need change, in Republic of Serbia theres taxes and rates localy created, called STOPA AMORTIZACIJE, purchasing date of assets (DATUM NABAVKE OSNOVNOG SREDSTVA), other attribut rate2 called REVALORIZACIJA, account relation is good have 0230 values from accounts and 0239 as changed values, asset groups is determined by low as sub accounts, and other parameters can be changed or added. Fixed Asset Management can extend assets with this customised functionality, adding new tables and creating references (forein keys). This firs method discibe simlple modification of Adempiere 3.1.0 most complicated way is change into TRUNK of Adempiere 3.1.0 with GeneratedModel.java and practicaly reinstalation of all code.


Fig 3 : Table XX_MATERIAL have automaticaly created Persistence Objects (PO) and work fine

Fig 4: Invoices from Republic of Serbia have field called PIB, theres need add new field PIB varchar2(255) and again complete call NEW c_invoice table created New Window and New Form, on easy way with default lengh of db colum look like above picture

субота, 15. мај 2010.

AccountingRS how to set on Adempipere 354a/355 (KONTNI PLAN)

Duplicate records and lenght more than 60 bytes, column maximum recognise as error, so need import AcountUS.csv and then update accounts. Initial client setup is like fig 1. Adempiere 353a have corected AccountsRS.csv( KONTNI PLAN REPUBLIKE SRBIJE), but Adempiere 354 and 355 not.


Fig 1 Import AccountsRS.csv


Fig 2 insert accounts RS


Fig 3 message


Fig 4 Completed accounting of Republic of Serbia (KONTNI PLAN REPUBLIKE SRBIJE - maj 2010)

Adempiere based on postgresql 8.3 and JBoss 432

Postgresql 8.3 is relational database, compatible with Adempiere 353a/354a (and older version of Adempiere). Postgresql 8.3 vs Oracle XE 10g is in limit of available spaces, oracle have 4gbytes max data. Its too spaces if u not need pictures (for products, for scanned contracts, other documents, files, pictures in jpg, pdf, png and other formats). With Oracle sql developer can be develop very easy Oracle tables/procedures and functions, but plugin for postgresql not exist yet. This is simple examples how can user/users install Adempiere 353/354 with postgresq databases. I was trying it, based on Ubuntu 9.04 operating systems.


Fig 2 creation new database with pgadmin III


Fig 3 Adempiere_pg.dmp will install adempiere relational model with initial data, with utility dumping, like pic 3 descibe



Fig 4 Runing RUN_setup.sh installation begin.