View source | View content page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

Projects:Booking Control/Technical Specification Booking Control for Accounting Unit

Contents

TECHNICAL SPECIFICATION OF BOOKING CONTROL FOR ACCOUNTING UNIT

PURPOSE OF THE PROJECT

The purpose of this document is to describe the technical Specifications for an extension module to be developed in OB ERP version 2.50 called Booking Control for Accounting Units.

INTRODUCTION

This technical specifications document outlines the implementation of Booking Control for Accounting Units features.

TECHNICAL IMPLEMENTATION :

This module will provide a new window for configuring accounting units, and a modification to the org schema tab of the organization window in order to link organizations to accounting units, and therefore to link booking control sequences to accounting units.

REQUIRED FILES

A new .obx file will be provided containing the new window and the modification to a window.

JAVA PACKAGE AND DB PREFIX

Java Package: org.openbravo.obbo_acctunit DB Prefix: BCAU

New database objects


TABLE SCRIPT FOR POSTGRES


CREATE TABLE BCAU_ACCOUNTING_UNIT(

 bcau_accounting_unit_id character varying(32) NOT NULL,
 ad_client_id character varying(32) NOT NULL,
 ad_org_id character varying(32) NOT NULL DEFAULT '0'::bpchar,
 isactive character(1) NOT NULL DEFAULT 'Y'::bpchar,
 created timestamp without time zone NOT NULL DEFAULT now(),
 createdby character varying(32) NOT NULL,
 updated timestamp without time zone NOT NULL DEFAULT now(),
 updatedby character varying(32) NOT NULL,
 "value" character varying(30) NOT NULL,
 description character varying(255),
 ad_sequence_id character varying(32) NOT NULL,
 CONSTRAINT bcau_accounting_unit_key PRIMARY KEY (bcau_accounting_unit_id),
 CONSTRAINT bcau_accounting_unit_isac_chk CHECK (isactive = ANY (ARRAY['Y'::bpchar, 'N'::bpchar])),
 CONSTRAINT bcau_acc_ad_sequence FOREIGN KEY (ad_sequence_id) REFERENCES ad_sequence (ad_sequence_id),
 CONSTRAINT bcau_acc_ad_client FOREIGN KEY (ad_client_id) REFERENCES ad_client (ad_client_id),
 CONSTRAINT bcau_acc_ad_org FOREIGN KEY (ad_org_id) REFERENCES ad_org (ad_org_id),
 CONSTRAINT bcau_accounting_unit_value UNIQUE(ad_client_id, "value")

);


ALTER TABLE ad_org_acctschema ADD COLUMN em_bcau_accounting_unit_id varchar(32);

ALTER TABLE ad_org_acctschema ADD CONSTRAINT em_bcau_au_ad_org_as FOREIGN KEY (em_bcau_accounting_unit_id) REFERENCES bcau_accounting_unit (bcau_accounting_unit_id);

CREATE OR REPLACE FUNCTION bcau_accounting_unit_trg() RETURNS trigger AS $BODY$ DECLARE BEGIN IF AD_isTriggerEnabled()='N' THEN IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF; END IF; IF TG_OP = 'UPDATE'THEN IF (OLD.ad_sequence_id <> NEW.ad_sequence_id) THEN UPDATE ad_org_acctschema SET em_obbo_sequence_id = NEW.ad_sequence_id WHERE em_bcau_accounting_unit_id = OLD.bcau_accounting_unit_id; END IF; END IF; IF TG_OP = 'DELETE' THEN RETURN OLD; ELSE RETURN NEW; END IF; END; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100;

CREATE TRIGGER bcau_accounting_unit_trg AFTER UPDATE ON bcau_accounting_unit FOR EACH ROW EXECUTE PROCEDURE bcau_accounting_unit_trg();


Application Dictionary

New objects should be registered in Application Dictionary as follows:

Accounting Units: General Setup || Enterprise || Accounting Units Header: based on the table BCAU_ACCOUNTING_UNIT


Accounting unit: On existing tab Org. schema of the Organization window: General Setup || Enterprise || Organization

DB Column Name: AD_ORG_ACCTSCHEMA.EM_BCAU_ACCOUNTING_UNIT_ID


BCAU_List_account_units: On field Accounting unit of existing tab Org. schema of the Organization window: General Setup || Enterprise || Organization

Source DB Column Name : BCAU_ACCOUNTING_UNIT.BCAU_ACCOUNTING_UNIT_ID, BCAU_ACCOUNTING_UNIT.VALUE, BCAU_ACCOUNTING_UNIT.DESCRIPTION


Target DB Column Name: AD_ORG_ACCTSCHEMA.EM_BCAU_ACCOUNTING_UNIT_ID


OrganizationSchemaLoadSequenceNumber: On field Accounting unit of existing tab Org. schema of the Organization window: General Setup || Enterprise || Organization

Source DB Column Name : BCAU_ACCOUNTING_UNIT.AD_SEQUENCE_ID

Target DB Column Name: AD_ORG_ACCTSCHEMA.EM_OBBO_SEQUENCE_ID

Reference data

The module does not contain any reference data.

Processes

The module does not include any process.

Menu Creation in Application Dictionary


Dependencies

The module Booking Control for Accounting Unit depends on Booking Control (version 1.0.13) and Core (version 2.50.19232 label MP27-EU1).

To test

OPEN DISCUSSION ITEMS

CLOSED DISCUSSION ITEMS

Retrieved from "http://wiki.openbravo.com/wiki/Projects:Booking_Control/Technical_Specification_Booking_Control_for_Accounting_Unit"

This page has been accessed 516 times. This page was last modified on 19 January 2018, at 10:11. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.