Difference between revisions of "User:Omidp"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(MY wishList)
(MY wishList)
Line 471: Line 471:
 
* [http://www.exampledepot.com/egs/java.io/pkg.html iojava]
 
* [http://www.exampledepot.com/egs/java.io/pkg.html iojava]
 
* [http://www.covalent.net/beta/AMS/downloads.php SpringSource Application suite Management (AMS)]
 
* [http://www.covalent.net/beta/AMS/downloads.php SpringSource Application suite Management (AMS)]
 +
* [http://sourceforge.net/projects/jexcelapi/ A Java library for reading/writing Excel]
  
 
= Some java tip =  
 
= Some java tip =  

Revision as of 09:14, 10 April 2008

Name This user real name is : Omid Pourhadi
Sourceforge logo.png This user has a Sourceforge account.
Wikipedia logo.png This user has a Wikipedia account.

About Me

I am omid pourhadi and started IT (information Technology) at 2001 I love software development and want to learn something new always In this way many people influence on me I would like to regards all of them

  • I am an Aptech (java) certified programmer
  • Bachelor degree in Biology

My Favorites

  • Movies i like : The Matrix, Devil's Advocate, The One, Fist of Legend, Basic Instinct,Saw, Sweet November
  • Music i like : Linkin Park, Evanescence, Avril Lavigne, Children of boodom, Cradle Of filth ,System of a down
  • Books i like : buddhist wisdom, on the Art Of War by Sun Tze, Buddhist Qigong
  • Websites i like : orkut, gazzag, yahoo,google, openbravo, oracle, pageflakes

Quotes i like

Omid's projects based on ADempiere

Project 0 (area: Localization and Translation)

  • Adding Persian Calendar
  • Translation


Project 1 (area: Implements Purchase & Warehouse and Sales Module)

  • Customizing Windows and forms with the application dictionary and core changing

Project 2 (Bounced cheque)

A bounced cheque or RDI (returned deposit item) is a cheque that is returned to the depositing bank because the owner of the account in the issuing bank has insufficient funds to cover its value, has issued a stop payment on the cheque, or their account has been closed or is frozen/limited. In the United States, usually the cheque writer's bank and the other bank charge the cheque writer a penalty for the transaction, and in some instances the writer can be charged with a criminal action. cheque

  • Account : 12120-A/R Non Sufficient Funds Returned Checks

Project 3 (area: LandedCost)

Implement cost ditribution

  • Minvoiceline.java
getBase(lc.getDistributionCost,getInvoiceId())
  • MinoutLine.java

change getbase method => getbase(args0,int invoiceId)

Minvoice invoice=new Minvoice(getCtx(),invoiceId,trx_Name)
MinvoiceLine[] lines=invoice.getLines(false);
for(int i=0;i<lines.length;i++){
   if(lines[i].getMinoutlineid == get_MinoutLineId()) // check receipt line is equal to invoice line
       return lines[i].getlineNetAmt();
}

Formula : base * LineNetAmt / total

Project 4 (area: Enhancement)

  • Adempiere on Open Swing

Project 5 (area: Solar Fiscal)

Project 6 (Manufacturing)

  • Manufacturing Resource : IsManufacturingResource Tick + ManufacturingResourceType = Plant
  • [1] Bug Fix

Reference:

Distribution Resource Planning

Manufacturing Resource Planning

Libero MRP II to ADempiere

Capacity Planning

Supply Chain

Operation Management

Libero FAQ

LiberoAD

Libero Test Plan

ADempiere

Adempiere Coding guidline

Set to context

Env.setContext(Env.getCtx(), "#AD_Client_ID", 1000000);
Env.getAD_Client_ID(Env.getCtx());

Set Value To DB Column

MBPartner bp = new MBPartner(Env.getCtx(), 0, null);
bp.set_ValueOfColumn("AD_Client_ID", client_id);

Awesome Features

Functionality Tips on sf and wiki

How Cost centers are implemented in Adempiere?

sf.net post Adempiere support cost center using organization setup( have a look at the organization and organization type setup). Also, the transact organization element could be turned on in accounting schema to handle this.

Budgeting in Adempiere

sf.net post

Cash Flow

CF

Sales Forecast

definition

SQL Statement

CREATE OR REPLACE VIEW adempiere.inventorycardexqty AS 
 SELECT NULL::character varying AS description, 
        CASE
            WHEN (cus_rv_inventorycardex.movementtype = ANY (ARRAY['M+'::bpchar, 'V+'::bpchar])) AND 
cus_rv_inventorycardex.movementqty > 0::numeric 
THEN cus_rv_inventorycardex.movementqty
            ELSE NULL::numeric
        END AS receipt, cus_rv_inventorycardex.movementqty AS balance, 
        CASE
            WHEN (cus_rv_inventorycardex.movementtype = ANY (ARRAY['M-'::bpchar, 'C-'::bpchar, 
'I+'::bpchar])) AND cus_rv_inventorycardex.movementqty < 0::numeric THEN 
cus_rv_inventorycardex.movementqty
            ELSE NULL::numeric
        END AS shipment, cus_rv_inventorycardex.movementdate, 
cus_rv_inventorycardex.m_product_id, 
cus_rv_inventorycardex.m_warehouse_id, cus_rv_inventorycardex.c_uom_id, 
cus_rv_inventorycardex.ad_org_id, cus_rv_inventorycardex.ad_client_id
   FROM cus_rv_inventorycardex;
ALTER SCHEMA omid RENAME TO adempiere;
SELECT sqlj.install_jar('file:///....', 'sqlj', true);
ALTER SCHEMA adempiere RENAME TO omid;
SELECT sqlj.set_classpath('omid', 'sqlj');


Receipt VS Return Material

  • table name = m_inout
  • window = material receipt
document type = MM Receipt, MM Return 
Movement Type = V+ 
  • table name = m_inout
  • window name : shipment
document type = MM Shipment, MM vendor Return 
Movement type = -C
  • table name = m_inventory and join with c_doctype
  • window name : Internal use , physical inventory
document type : physical inventory
  • window name : inventory move
document type : Material physical inventory (Material Movement)

Movement type

  • Customer Returns :
  • Customer Shipment : shipment window
  • Inventory In : physical inventory
  • Inventory Out :
  • Movement From : Inventory move
  • Movement To : Inventory move
  • Production - :
  • Production + :
  • Vendor Receipts : material receipt = MM Receipt, MM return
  • Vendor Returns :
  • Work Order - :
  • Work Order + :

DB and java and ad

  • VTrxMaterial.java
  • tablename : m_transaction
  • List Reference : M_Transaction Movement Type

UOM

Hint :

  • qty/dividedRate = base unit
  • qty*multipleRate = base unit

Install Adempiere on IBM java

Localizing Files

Add Persian Calendar

  • VDate.java
  • Calendar.java
  • VCellRenderer.java
  • Language.java

RTL (Right To Left) & ReBranding

  • Adempiere.java
  • ALogin.java
  • ALoginRes.java
  • ALoginRes_fa.java
  • AMenu.java
  • AmtInWords_FA.java
  • APanel.java
  • CLabel.java
  • ConfigurationPanel.java
  • CPanel.java
  • GridController.java
  • ProcessParameterPanel.java
  • SetupRes.java
  • Splash.java
  • VTreePanel.java
  • VPanel.java

Font

  • AdempiereTheme.java
  • CompiereTheme.java

Report

  • LayoutEngine.java
  • Viewer.java
  • PrintDataElement.java

Well-known window

تنخواه

  • Cash Book
  • Cash Journal
  • Charge
  • Generate Charges

Warehouse

  • Warehouse & Locator
  • Inventory Move
  • Physical Inventory
  • Internal Use

Basic Setup

  • Product
  • Product Cost
  • Product group
  • Business Partner

work Flow for system setup

  • product setup
  • price list setup
  • accounting setup

Purchasing

  • Requisition
  • create po from req
  • Purchase Order
  • Material Receipt
  • Invoice (Vendor)
  • Matching (po-Receipt-Invoice)

Payment

  • Payment
  • Payment Allocation
  • Payment Selection
  • Print / Export Payment (after payment selection always run Print / Export Payment)

Accounting

  • Financial report 1) state of account 2)trial balance

My Favorite Process

  • Synchronize Terminology
  • Sync Translation Doc
  • cache reset
  • generate po from sales order
  • generate shipment
  • generate invoice
  • reset accounting
  • warehouse organization

My Patches & Contributions in Adempiere

Contributions

  • [2] Add Iran Cities
  • [3] Add iran states

I think this is usefull for logistic Patches i submited

  • [4] Designing java form with netbeans in adempiere
  • [5] Fix Right to Left
  • [6] Amount in Words (Farsi Version)
  • [7] Fix Move Confirmation window

Template Process and steps to create a process

Adempiere Accounting

  • FA
  • Account Schema window is very impoertant to basic setup Accounting

Cash generated from customers

***************

Cash paid to suppliers

***********

Posting Account in src

  • Doc.java
  • Doc_TableName.java
  • DocLine_TableName.java

Generate Model

Creating Batch file for generate model

  • Create C:\Adempiere\model\ Folder
@ECHO OFF
ECHO.
ECHO Model is generating
:START
java -cp %ADEMPIERE_HOME%\lib\Adempiere.jar;%ADEMPIERE_HOME%\lib\AdempiereCLib.jar;
%ADEMPIERE_HOME%\lib\CSTools.jar org.compiere.util.GenerateModel C:\Adempiere\model\ 
org.compiere.model 'U'
ECHO.
PAUSE
CLS
EXIT
  • Rules fro generating MClass and XClass
X_Class automatic generate by generatemodel file that has different type like 'U' or 'D'
for generating MClass if your table name has less than 3 letters before underline ( _ )
mclassname is M + cut tablename after underline like ZZ_WF => MWF
but if your table name has more than 3 letters
before underline like CUS_Omid your model class name is MCUSOmid (M + TableName without _ ) 


WorkFlow (Wf)

Download Wf Reference

/**	Process Message 			*/
	private String		m_processMsg = null;

public String getProcessMsg() {
		// TODO Auto-generated method stub
		return m_processMsg;
	}
public String prepareIt() {
		log.fine("prepareIt");
		System.out.println("prepareIt");
		return DocAction.STATUS_InProgress;
	}
public boolean processIt(String processAction) throws Exception {
		m_processMsg = null;
		DocumentEngine engine = new DocumentEngine (this, getDocStatus());
		return engine.processIt (processAction, getDocAction());
	}
  • your window should be in transaction mode
  • XOR means that only the first valid transition is executed, and

'AND' means all the transitions are executed.

  • Since the 'Std User Workflow' tickbox is ticked ,

this node will ONLY be executed if the Action is 'COMPLETE', and some other conditions which are still undefined in this document. (This has been determined from the source code).

  • DocumentEngine.java and VDocAction fill state of document (complete - void - close - ....)

Add SQLJ

Set search_path to adempiere,sqlj;
CREATE OR REPLACE FUNCTION adempiere.persiancalendar(gregoriandate timestamp with time zone)
  RETURNS character varying AS
'org.compiere.sqlj.persianCalendar.returnPersianCalendar(java.sql.Timestamp)'
  LANGUAGE 'java' VOLATILE;
ALTER FUNCTION adempiere.persiancalendar(gregoriandate timestamp with time zone) OWNER TO postgres;
select sqlj.replace_jar('file:///C:/Adempiere/lib/sqlj.jar','sqlj',true )
select persianCalendar(now())

Adempiere Architecture

Adpm.jpg

Adempiere WEB

  • WebDoc.java
  • WFieldUpdate
  • window.js
  • Don't choose unicode role WebDoc can not create unicode character to load client
  • use build.xml in serverApps to compile webUI with ant

Localiztion Hints

  • Use negative Qty for Return Material
  • Uncheck Allow Negative Posting
  • Translation.java
if(m_centrallyMaintain)
{
o.IsCentrallyMaintain='N' => o.IsCentrallyMaintain='Y'
}

Window Button

  • VCreateFrom => initBPartnerOIS (int C_BPartner_ID, boolean forInvoice)
  • VCreateFromShipment
=> initBPInvoiceDetails(int C_BPartner_ID)
=> initBPRMADetails(int C_BPartner_ID)
  • VCreateFromInvoice => initBPDetails(int C_BPartner_ID)

OpenBravo

Omid's Activity

  • [9]Translate and implement eyeOS
  • [10]coordinating the Iran localization of Openbravo. I lead this project
  • [11] translate openProj

ERP System

Adempiere provides all standard ERP features including Accounting, Sales and Purchase cycle, Inventory management. Adempiere Wiki

Free/OpenSource License: Mozila Public License (MPL) Operating System: All Language:Java Openbravo is the leading fully functional integrated web-based open source enterprise management (ERP) system that offers a unique value proposition - a higher value at a lower cost. OpenBravo Wiki

My Favorite Technology

Jasper Reports

iReport Hints

  • Always set Parameters data type to BigDecimal
  • Everything is case-sensitive
  • org.compiere.report.ReportStarter

Hobby & Fun

MY wishList

Some java tip

  • Abstract Classes versus Interfaces
  • static: states that the method can be called without an object
  • abstract: implies that the method does not have code, and has to be implemented

in the subclass

  • final: states that the method cannot be inherited or ovveridden
  • Synchronized: used with a method while implementing threads. it permits only one

thread access to a block of code at a time

  • volatile: used with a variable to indicate that the value of variable can be

changed several times during RUNTIME and its value is not store in the registers

  • Overloading and overriding methods: overloaded methods are in the same class

and have the same name but different parameter lists and different types of data overriding methods are in the superclass as well as subclass. overriding allows a general class to specify methods that will be common to its subclasses. e.g a class define general method 'area()' . this method maybe implemented in subclasses to find the area of particular shapes, such as , rectangle or triangle

  • Class Constructor: Explicit constructor

you can code these constructor in the class definition while creating an object of the class Implicit Constructor when you do not define a constructor for class the JVM provides a default or implicit constructor

  • Interfaces:it allows to class to have a several superclass

An interface is used instead of abstract class where there are no implementation or inherit [16]

Interested Project in SF.net

this is usefull for creating pdf in createPdf method in DocAction

framework to develop j2ee application need to know java anotation or jpa

Ajax framework. 100% Java, no JavaScript

OpenSwing is a components library that provides a rich set of advanced graphics components for developing desktop applications and HTTP based java applications/RIAs based on Swing front-end.

Jabber Client

Contact

  • E-Mail: omidpourhadi [AT] gmail.com
  • Yahoo Messenger: vata2999
  • Phone: +98 935 519 69 65