# This file is an annotated combination of Louis's accounting design # (version of May 23) and a concatenated collection of all of Neilt's # base and supply chain gcd. The accounting design was run through # the HTML-to-gcd converter. # # # The purpose of the annotation is to indicate places where the two # sets of files could be coordinated for integration. There are areas # in the accounting design that are covered in the base or supply- # chain, although the coverage is not exactly the same. Issues are # raised in the accounting design that suggest additional items in the # base and supply chain, after which the accounting item can be # replaced by the modified base or supply chain item. # # # Also noted are places where additional elements of gcd syntax can be # used to simplify the accounting design # # # The major annotation text is provided in the accounting part. # The "Base/SC Reference" number is annotated in the accounting part to # allow referencing in the Base/Supply-Chain part by noting the reference # numbers that affect each module Base/Supply-Chain. Many of the reference # numbers represent duplicates or related versions of the same issues. # File initially created by Stan Klein, May 26, 2001 # Except for the last 3 items, class sysparam looks like a variant of # base/sc class company } class sysparam { INT org_id ; # Organization Identification A serial number assigned by the system. CHAR org_name<50> ; # Organization legal name Company, Corporation, Enterprise, Society # Base/SC reference 1 # The next several lines look like a variant of base/sc address and # comm classes. url is possibly a new item to be added there CHAR street_line1<30> ; CHAR street_line2<30> ; CHAR city_name<30> ; CHAR country_name<30> ; CHAR postal_code<10> ; # Postal code Postal Code or Zip code CHAR state_code<2> ; # State code USA state code CHAR phone_no1<20> ; CHAR phone_no2<20> ; CHAR fax_no<20> ; CHAR e_mail<50> ; CHAR url_address<50> ; # Rather than using a boolean flag, multi_cur and multi_whs could be # replaced by a list of currencies and warehouses using the gcd list # syntax BOOL multi_cur ; # Multi currency This organization uses multi currency feature BOOL multi_whs ; # Multi Warehouse This organization uses multi warehouse feature CHAR convert_method<16>; # Translation method from foreign to functional currency local_to_foreign: One local unit = X foreign units , foreign_to_local: One } class tax { INT org_id ; # Organization Organization ID INT tax_id ; # Taxation ID Serial Key Assigned by the system. CHAR tax_code<8> ; # Tax Code Code assigned by the user CHAR tax_entity<30> ; # Entity Description A Taxation entity is a combination of diffrent taxation authorities like : federal } class tax2 { INT tax_id ; # Taxation ID TAX2.tax_id = TAX.tax_id CHAR tax_authority<30>; # Taxation Authority Federal, State, Provincial, municipal, etc... CHAR tax_register_no ; # Register Number The official registration number with this tax authority # tax_rate probably needs to be done as a time-varying parameter with # start and stop dates for parttcular rates. Perhaps a list of rates # and applicability dates INT tax_rate ; # Tax Rate Percentage applicable INT tax_paid_gl_id ; # Tax Paid GL Account ID GL Asset account to record taxes paid to vendors INT tax_charge_gl_id ; # Tax Charged GL Account ID GL Liability acount to record taxes charged to customers BOOL tax_on_tax ; # Tax on tax Yes = This taxe is cumulative. Taxable amount includes any previously calculated CHAR tax_calc_order<1>; # Calculation Order Calculation Order is necessary if a Tax_on_tax is set to Yes } # language is a copy of base:: language class language { INT language_id ; # Language Identification Serial Key Assigned by pgm CHAR language_code<8> ; # Language Code CHAR dialect_code<8> ; CHAR description<25> ; # Description } # Label looks like it was "over-fixed" from an email discussion # See annotation below class label { INT label_id ; # Label ID Serial Key Assigned by the pgm # Base/SC reference 2 # The following 5 items (3 from an old version of label and 2 from # base::help) could be reduced to 3 total. They point to the form or # report item that uses the label. CHAR module_name<25> ; # Module Name CHAR class_name<25> ; # Class Name Table CHAR pgm_name<16> ; # Program Name Reference to the program using this text CHAR field_name<16> ; # Name of the field Reference to the field or control name CHAR pgm_filter<16> ; # Program Filter A string in the program allowing to create a view of the appropriate labels # What somehow got removed was the translated label data itself # Here is my suggested version: # char language_code<8>; # char dialect_code<8>; # CHAR text_1<30> ; # Label text for the language visible to the end user # boolean has_help_text ; # Indicator that there is help text for this label # Base/SC reference 3 # The following three items are a candidate for a separate class in # Base and separate functionality in geas or elsewhere (the audit trail # issue on configuration changes). CHAR create_by<20> ; # Developer Name Developer Name DATE create_date ; # Creation Date Record creation date CHAR where_use<100> ; # Where Used Documentation on how and where this text is used. } # class help looks like a copy or version of base::language::help class help { INT label_id ; # Label ID Reference to the label INT language_id ; # Language ID Reference to the language CHAR help_text<1000> ; # Help Text User contextual help CHAR help_keywords<100>; # Help Keywords Keywords for searches CHAR tool_tip<50> ; # Tool Tip Short help displayed when the user's mouse passes over the field CHAR default_text<100>; # Default Text Default Text Data for new fields CHAR create_by<20> ; # Translator Name Translator or developer name DATE create_date ; # Creation Date Record creation date } # Base/SC reference 4 # uom covers the same issue as base::units Except activity_status # and uom_class are not in base::units and would need to be added class uom { INT uom_id ; # Unit of measure identification Serial Key A serial number assigned by the system CHAR uom_code<8> ; # Unit of measure code A code assigned by the user CHAR uom_descript<30> ; # Unit Of Measure Description CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated CHAR uom_class<16> ; # Unit of measurement classification Quantity, Time, Volume, Weight, Distance, Dimension, Length, Height, Width, } # Base/SC reference 5 # territory, industry, and class should go into base. # perhaps "class" should be changed to "category" to avoid confusion class territory { INT territory_id ; # Territory identification Serial Key A serial number assigned by the system CHAR territory_code<8>; # Territory code A code assigned by the user CHAR territory_desc<30>; # Territory Description CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated DATE create_date ; # Creation Date Record creation date System date assigned by pgm } class industry { INT industry_id ; # Industry identification Serial Key A serial number assigned by the system CHAR industry_code<8> ; # Industry code A code assigned by the user CHAR industry_desc<30>; # Industry Description CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated DATE create_date ; # Creation Date Record creation date System date assigned by pgm } class class { INT class_id ; # Class identification Serial Key A serial number assigned by the system CHAR class_code<8> ; # Class code A code assigned by the user CHAR class_desc<30> ; # Class Description Description CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated DATE create_date ; # Creation Date Record creation date System date assigned by pgm } # In accparam, the boolean activity flags could be replaced by a list # of active modules using gcd list syntax, after defining a type # "accounting_module" class accparam { INT org_id ; # Organization Identification ACCPARAM.org_id = SYSPARAM.org_id BOOL ar_active ; # Accounts Receivable Active Module has been activated BOOL ap_active ; # Accounts Payable Active Module has been activated BOOL so_active ; # Sales Order Active Module has been activated BOOL po_active ; # Purchase order Active Module has been activated BOOL ic_active ; # Inventory Control Active Module has been activated BOOL pr_active ; # Payroll Active Module has been activated BOOL br_active ; # Bank Reconciliation Active Module has been activated BOOL fa_active ; # Fixed Assets Active Module has been activate } class cur { INT cur_id ; # Currency identification Serial Key A serial number assigned by the system INT org_id ; # Organization Id Organization Id BOOL local_currency ; # This is the functional currency Reporting currency, local currency or domestic currency are synonyms CHAR cur_code<8> ; # Currency code A code assigned by the user CHAR cur_symbol<5> ; # Currency symbol Symbol to be printed before or after the amounts CHAR cur_name<20> ; # Currency name Currency name CHAR symbol_position<1>; # Position of currency symbol 1= After Amount, 2=Before Amount, 3=Not printed CHAR negative_format<1>; # Negative Amount Format 1= Parenthesis, 2 = Minus sign before currency symbol, 3 = Minus sign before BOOL negative_red ; # Negative amount red Display negative amount in red color CHAR decimal_char<1> ; # Decimal character Generally , or . but could be any character CHAR digit_after_dec<1>; # Number of digits after decimal 1 or 2 or 3 or 4 CHAR group_separator<1>; # Character used to split group of digits Generally a space but could be any character CHAR digit_in_group<1>; # Number of digits per group Generally 3 but could be any number < 10 INT rounding_up ; # Currency rounding up method How calculated amounts in that currency are to be rounded up to be continued # Base/SC reference 6 # above here cur covers currency rendering in forms and reports, and # probably belongs in Base as part of Base::currency. Below # here it covers accounts used for various business processes that # have currency-dependent aspects INT ar_ctrl_acct_id ; # Receivables control account Id GL Asset Account for tracking receivable in this currency INT bank_acct_id ; # Bank account Id GL Bank account for this currency INT bank_suspens_id ; # Bank Suspense Id GL suspense account to track customer check in the process of being deposited INT ar_freight_id ; # Income account for freight Id GL Revenue account for tracking freight charged in this currency INT ar_deposit_id ; # Customer deposit account Id GL Liability control account for tracking deposits received from customers This INT ar_dep_offset_id ; # Customer Deposit offset account id GL Contra liability account. This account is debited when the customer check INT ar_reimb_acct_id ; # Customer Reimbursement Account A temporary account used to reimbursement a customer credit balance. This account INT ar_early_pay_id ; # AR Early payment discount account Id GL Expense account to track discounts to customers for early payments INT ar_late_pay_id ; # AR Late payment charge account Id GL Revenue account to track charges to customers for late payments INT ar_adjustment_id ; # AR Adjustment Account ID Revenue or expense account to record minor adjustments made via the Cash Receipt INT ap_ctrl_acct_id ; # Payables control account Id GL Liability Account for tracking payables in this currency INT ap_freight_id ; # AP Expense account for freight Id Gl expense account to track freight paid to vendors in this currency INT ap_deposit_id ; # AP Vendor deposit account Id GL asset control account to track deposits made to vendors. This account is INT ap_dep_offset_id ; # AP Vendor deposit offset account Id Temporary GL Contra asset account. This account is credited when our check INT ap_reimb_acct_id ; # Vendor reimbursement Account ID A temporary account to record checks received from vendor paying back AP debit INT ap_early_pay_id ; # AP Early payment discount account Id GL revenue account to track discount taken in this currency INT ap_late_pay_id ; # AP Late payment charge account Id Gl expense account to track charges paid to vendors in this currency INT ex_gain_loss_id ; # Exchange gain or loss account Id GL revenue or expense account to track conversion gain or loss } # Base/SC reference 7 # cur2 is probably a good prototype for a Base class that deals with # time-varying rates, such as for commodity trading. DATE should # optionally be replaceable by DATETIME class cur2 { INT cur2_id ; # Currency rate identification A serial number generated by the system INT cur_id ; # Currency identification CUR.cur_id = CUR2.cur_id DATE date_rate ; # Date the rates were obtained Rates of exchange should be entered daily, if not the programs will compute INT purchase_rate ; # Purchasing Rate This rate is used for PO and AP Note: if CUR.local_currency is set to Yes INT sell_rate ; # Selling Rate This rate is used for SO and AR Note: if CUR.local_currency is set to Yes sell_rate } class term { INT term_id ; # Term identification A serial number generated by the system CHAR term_code<8> ; # Term Code Codification assigned by the user CHAR term_descript<30>; # Term Description Descriptionto be printed on documents and reports CHAR pay_type<16> ; # Payment Types Types of payment : Cash on delivery, Certified check on delivery, Check on delivery, Collect } class term2 { INT term_id ; # Term identification TERM2.term_id = TERM.term_id INT net_days ; # Net Days Number of days after wich the payment is due INT discount_days ; # Discount Days Number of days allowed to take advantage of the stated discount Invoice date INT discount_percent ; # Discount percentage Discount applicable only if payment is made before Discount Due Date INT percent_due ; # Percentage Due Percentage of the invoice amount due (Instalment credit) The total of the percentages INT net_on_this_day ; # Net on this day (1 to 31) The invoice is payable on this day of the month. INT current_plus ; # Current Month Plus Number of months to add to current month to derive due date. 0 to 12 } # Base/SC reference 8 # There probably needs to be a term3 in Base that covers legal terms # and conditions often attached to purchase orders and sales documents class ship { INT ship_id ; # Shipping identification A serial number generated by the system CHAR ship_code<8> ; # Shipping Code Codification assigned by the user CHAR ship_descript<30>; # Shipping Description Description to be printed on documents and reports CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated DATE create_date ; # Create Date Record creation date } # Base/SC reference 9 # contact covers the same area as Base::contact except it includes # items of language preference, activity status, and contact notes # It also has back-pointers to vendor and customer usage class contact { INT contact_id ; # Contact identification Serial Key Assigned by pgm INT vendor_id ; # Vendor identification CONTACT.vendor_id = VENDOR.vendor_id INT cust_id ; # Customer identification CONTACT.cust_id = CUSTOMER.cust_id CHAR phone_no1<20> ; # Phone Number 1 CHAR phone_no2<20> ; # Phone Number 2 CHAR fax_no<20> ; # Fax number CHAR e_mail<50> ; # Elctronic mail CHAR contact_name<50> ; # Contact Name CHAR contact_title<20>; # Contact Title INT lang_pref_id ; # Language preference ID Language spoken CHAR url_address<50> ; # URL address CHAR contact_note<100>; # Contact Notes Contact note pad CHAR activity_status<16>; # Activity Status Active, Inactive or Deactivated } # In glparam, the xx_posting items could be made more general by # replacing them with a "posting" type and a list of active-journal # posting policies using the gcd list syntax # Similarly, the ledger segmentation items could be replaced by a # defined type and a list based on active ledger types. Then GNUe # would have provisions for any future creativity in the accounting # profession regarding ledgers and costing. :-) # Note suggested by DN email: Is municipal "fund accounting" another ledger? class glparam { INT org_id ; # Organization Identification GLPARAM.org_id = SYSPARAM.org_id BOOL abc_active ; # Activity Based Costing Active The organization uses the Activity Ledger BOOL pbc_active ; # Project Based Costing Active The organization uses the Project Ledger CHAR sj_posting<16> ; # Sales Journal posting to GL This parameter can take 3 values : Real Time = Simultaneaously post to AR Sub. CHAR cr_posting<16> ; # Cash Receipt posting to GL Real Time, Batch or Batch Detailed CHAR pj_posting<16> ; # Purchase Journal posting to GL Real Time, Batch or Batch Detailed CHAR pj_posting<16> ; # Purchase Journal posting to GL Real Time, Batch or Batch Detailed CHAR cd_posting<16> ; # Cash Disbursement posting to GL Real Time, Batch or Batch Detailed CHAR ic_posting<16> ; # Stocks Receiving posting to GL Real Time, Batch or Batch Detailed CHAR pr_posting<16> ; # Payroll posting to GL Real Time, Batch or Batch Detailed CHAR br_posting<16> ; # Bank reconciliation posting to GL Real Time, Batch or Batch Detailed CHAR gla_segment<30> ; # General Ledger Account Segmentation Mask Ex : (XXX-XXXX-XX-X) CHAR ala_segment<30> ; # Activity Ledger Account Segmentation Mask Ex : (XXX-XXXX-XX-X) CHAR pla_segment<30> ; # Project Ledger Account Segmentation Mask Ex : (XXX-XXXX-XX-X) BOOL balance_qty ; # Balance quantities Yes, forces the user to balance the quantities in a journal entry INT retained_gl_id ; # Retained Earnings GL account identification GL Account Id uses by Year End Function to create the opening balance journal } # mask_picture might need to be replaced by the equivalent for Python # formatting class mask { INT mask_id ; # Mask identification Serial INT org_id ; # Organization Identification MASK.org_id = SYSPARAM.org_id CHAR mask_ledger<16> ; # Mask Ledger ``General Ledger'' or ``Activity Ledger'' or ``Project Ledger'' CHAR mask_picture<30> ; # Mask Picture Mask Ex : (XXX-9999.XX.X) 9999.999.99.9999 } class seg { INT seg_id ; # Segment identification Serial Key Assigned by pgm INT mask_id ; # Mask Identification SEG.mask_id = MASK.mask_id CHAR seg_name<30> ; # Segment Name Define by the user INT seg_sequence ; # Segment sequence 1 to 10 INT seg_length ; # Number of characters Number of character in this segment CHAR seg_type<16> ; # Segment Type Alpha or numeric. Could be derived from the mask picture } # In gl, the detailed posting flags could be replaced by a list of # detailed posting flags for the active journals using the gcd list syntax class gl { INT gl_id ; # General ledger Identification A serial number assigned by the system not visible to the user Primary key to INT org_id ; # Organization Identification Organization Identification CHAR gl_acct<30> ; # General Ledger Account Key for the user to access the account, can be updated by the user CHAR gl_title<60> ; # General Ledger Account Title General Ledger Account Title CHAR activity_status<16>; # GL Account Activity Status Active, Inactive, Deactivated BOOL ctrl_acct ; # Control Account Yes= This account controls a subledger BOOL sj_detail_post ; # Sales Journal detail posting to GL Detailed posting to this GL account Yes or No if GLPARAM sj_posting is set BOOL cr_detail_post ; # Cash Receipt detail posting to GL Detailed posting to this GL account Forced to No if GLPARAM.cr_posting is set BOOL pj_detail_post ; # Purchase Journal detail posting to GL Forced to No if GLPARAM.pj_posting is set to ``Real Time'' or ``Batch'' BOOL cd_detail_post ; # Cash Disbursement posting to GL Forced to No if GLPARAM.cd_posting is set to ``Real Time'' or ``Batch'' BOOL ic_detail_post ; # Stocks Receiving posting to GL Forced to No if GLPARAM.ic_posting is set to ``Real Time'' or ``Batch'' BOOL pr_detail_post ; # Payroll posting to GL Forced to No if GLPARAM.pr_posting is set to ``Real Time'' or ``Batch'' BOOL br_detail_post ; # Bank reconciliation posting to GL Forced to No if GLPARAM.br_posting is set to ``Real Time'' or ``Batch'' INT uom_id ; # Unit Of Measure for this account Hours for Salary accounts, Kilometers or miles for Traveling Expense accounts, CHAR gl_acct_type<16> ; # GL Account Type +Assets, -Liabilities, -Capital, -Revenues, +Expenses CHAR gvt_code<10> ; # Government Code Coding required for government reporting } class gl2 { INT gl2_id ; # General Ledger A serial number assigned by the system not visible to the user INT gl_id ; # GL Identification GL2.gl_id = GL.gl_id INT gl_prd ; # Financial Period number From 0 to 52 INT gl_year ; # Financial Year Financial Year # Base/SC reference 10 # Currency amounts in all places need to be coordinated with # Base::currency currency gl_amnt ; # Amount posted Total of all amounts posted to this account for this period/year currency commit_amnt ; # Commitment amount Total of all amounts commited to this account for this period/year INT gl_qty ; # Quantity posted Total of all quantities posted to this account for this period/year currency budget_amnt ; # Budget Amount Posted Total of all budget amnt posted for this period/year INT budget_qty ; # Budget Quantity Posted Total of all budget qty posted to this account for this period/year } # In cal, the posting status flags could be replaced by a list of # posting status flags for the active journals using the gcd list # syntax. This would simplify the integration of journals # specialized to an industry/enterprise-type or user-defined. # # Also, some organizations use an "accounting month". Does this # handle it? Probably so, but may need to be verified or something like a # financial_period_type added class cal { INT org_id ; # Organization Identification Organization ID INT cal_id ; # Calendar Identification A serial number assigned by the system INT cal_year ; # Financial Year Financial Year INT cal_prd ; # Financial period From 0 to 52 DATE start_date ; # First day of this financial period First day of this financial period DATE end_date ; # Last day of this financial period Last day of this financial period BOOL gl_open ; # Posting status from General Journal Yes = Open to posting, No = Close to posting BOOL ar_open ; # Posting status from Accounts Receivable Yes = Open to posting, No = Close to posting BOOL ap_open ; # Posting status from Accounts Payable Yes = Open to posting, No = Close to posting BOOL so_open ; # Posting status from Sales Order Yes = Open to posting, No = Close to posting BOOL po_open ; # Posting status from Purchase Order Yes = Open to posting, No = Close to posting BOOL ic_open ; # Posting status from inventory Control Yes = Open to posting, No = Close to posting BOOL br_open ; # Posting status from Bank reconciliation Yes = Open to posting, No = Close to posting BOOL pr_open ; # Posting status from Payroll Yes = Open to posting, No = Close to posting } class je { INT org_id ; # Organization Identification Organization Id INT je_id ; # Journal entry identification Serial Key A serial number assigned by the system not visible to the user. INT voucher_no ; # Journal entry voucher number A serial number assigned by the system, from a starting point specified by the DATE trans_date ; # Journal transaction date Financial year and period derived from this date. INT src_id ; # Source Journal Identification JE.src_id = SRC.src_id INT cal_year ; # Journal Entry Financial year Derived from the Financial Calendar INT cal_prd ; # Journal Entry Financial period Derived from the Financial Calendar INT reverse_je_id ; # Reverse by this journal entry Cross reference to the reversing entry (used by Cash Flow Statement) # Base/SC reference 11 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR entry_by<20> ; # Journal Entry enter by Login name of the user having created the entry. DATE entry_date ; # Entry date System date CHAR entry_stage<16> ; # Journal Entry Stage In progress, On approval, Posted to GL # Base/SC reference 12 # these next 3 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR gl_post_by<20> ; # Journal Entry posted by Login Name of the user having posted the entry DATE gl_post_date ; # Posting to GL date System date CHAR je_descript<100> ; # Journal Entry Descriptive text Explanation of the entry and/or references to support documents } class je2 { INT je2_id ; # Journal Entry detail identification Serial Key A serial number assigne by the systm, not visible o the user. INT je_id ; # Journal Entry header identification JE2.je_id = JE.je_id # The ledger account identifications could probably be replaced by a # list using the gcd list syntax INT gl_id ; # General ledger account identification JE2.gl_id = GL.gl_id INT activity_id ; # Activity ledger Account Identification JE2.activity_id = ACT.activity_id INT project_id ; # Project Ledger Account Identification JE2.project_id = PRO.project_id currency trans_amnt ; # Journal Entry Transaction Amount Journal Entry Transaction Amount INT trans_qty ; # Journal Entry Transaction Quantity Journal Entry Transaction Quantity CHAR trans_descript<100>; # Journal Entry Transaction Description Explanation and/or references to support documents currency frgn_amnt ; # Transaction Foreign Amount Transaction Foreign Amount currency budget_amnt ; # Budget Amount Budget Amount INT budget_qty ; # Budget Quantity Budget Quantity INT cur_rate ; # Currency Rate of exchange ------Needed if detail posting is selected------- INT cur_id ; # Currency Identification Currency Identification INT cust_id ; # Customer identification JE2.cust_id = CUSTOMER.cust_id INT vendor_id ; # Vendor Identification JE2.vendor_id = VENDOR.vendor_id INT item_id ; # Item identification Item identification CHAR invoice_no<16> ; # Invoice Number Reference to the purchase or sales invoice } class act { INT activity_id ; # Activity Identification Serial Key Serial number assigned by the system INT org_id ; # Organization Identification CHAR activity_acct<30>; # Activity Account A code assigned by the user CHAR activity_title<60>; # Activity Title CHAR activity_status<16>; # Activity Activity Status Active, Inactive, Deactivated } class act2 { INT act2_id ; # Activity periodic summary ID Serial Key A serial number assigned by the system INT activity_id ; # Activity Identification INT cal_prd ; # Financial Period number INT cal_year ; # Financial year currency act_amnt ; # Activity cumulative amount Amount posted for this current period/year INT act_qty ; # Activity cumulative quantity Quantity posted for this current period/year currency budget_amnt ; # Budget Amount Amount posted for this current period/year INT budget_qty ; # Budget Quantity Quantity posted for this current period/year } class pro { INT project_id ; # Project Identification Serial Key A serial number assigned by the system INT org_id ; # Organization identification CHAR project_acct<30> ; # Project Account A code assigned by the user CHAR project_title<60>; # Project Title CHAR activity_status<16>; # Project Status Active, Inactive, Deactivated } class pro2 { INT pro2_id ; # Project periodic summary ID Serial Key A serial number assigned by the system INT project_id ; # Project identification INT cal_prd ; # Financial period 0 to 52 INT cal_year ; # Financial Year currency pro_amnt ; # Project cumulative amount INT pro_qty ; # Project cumulative quantity currency budget_amnt ; # Budget Amount INT budget_qty ; # Budget Quantity } # This looks like a duplicate of something above class uom { INT uom_id ; # Unit of measure identification A serial number assigned by the system CHAR uom_code<8> ; # Unit of measure code A code assigned by the user CHAR uom_descript<30> ; # Unit Of Measure Description CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated CHAR uom_class<16> ; # Unit of measurement classification Quantity, Time, Volume, Weight, Distance, Dimension, Length, Height, Width, } # The use of src_std becomes unclear if journal items elsewhere are # implemented as lists class src { INT src_id ; # Source journal identification Serial Key A serial number generated by the system CHAR src_code<3> ; # Short Journal Name A code assigned by the pgm for the first 10 records. CHAR journal_name<30> ; # Long Journal Name BOOL src_std ; # Standard Source Journal No = A special journal added by the user. } # The following tables -- fs, fs2, and fs3 -- need to be # structured so they can drive a program that generates GNUe Report # Definition (grd) files. These are the files that control pulling of # the data from the database and formatting it as a report # This may also imply changes in the program that reads and interprets # grd's. This should be a subject for further discussion class fs { INT fs_id ; # Financial Statement Identification A serial number generated by the system CHAR fs_title<60> ; # Financial Statement Title BOOL fs_std ; # Financial Statement Standard No= A custom statement defined by the user CHAR fs_ledger<1> ; # Ledger to used 1 = General Ledger, 2 = Activity Ledger, 3 = Project Ledger } class fs2 { INT fs2_id ; # Financial Statement Line Identification Serial Key A serial number assigned by pgm INT fs_id ; # Financial Statement Identification FS.fs_id = FS2.fs_id CHAR line_title<60> ; # Line Title CHAR line_action<1> ; # Line Action Tells the printing program what to do : 0 = Print current amount, 1 = Print a } class fs3 { INT fs3_id ; # Financial Statement Account Identification Serial Key A serial number INT fs2_id ; # Financial Statement Line Identification FS3.fs2_id = FS2.fs2_id INT acct_id ; # Account Identification It could be gl_id, activity_id or project_id depending on FS.fs_ledger CHAR acct_mask<30> ; # Account Mask Account mask with meta-characters } # The aging ranges could be replaced by a type definition and a list # using the gcd list syntax class arparam { CHAR fin_charge_type<16>; # Finance Charges Type Real = Create a debit memo in customer account Fake = Only show finance charges CHAR statement_type<16>; # Statement Type Type of statement to be sent to customers : ``Open Item'' or ``Balance INT aging_range_1 ; # Aging Range 1 To print the Accounts receivable aged trial balance and customer statements Number INT aging_range_2 ; # Aging Range 2 Number of days in column 2 (Typically 60) INT aging_range_3 ; # Aging Range 3 Number of days in column 3 (Typically 90) INT aging_range_4 ; # Aging Range 4 Number of days in column 4 (Typically 120) } # Base/SC reference 13 # customer probably needs to be rebuilt using the base company class. # However, there are a large number of items in company that need to be # added in Base class customer { INT cust_id ; # Customer identification Serial Key Serial number assigned by pgm CHAR cust_acct<8> ; # Customer account Customer code assigned by the user # Base/SC reference 14 # The following group of items is a variant of base::address and # base::comm CHAR cust_name<50> ; # Customer name CHAR street_line1<30> ; # Customer Street 1 CHAR street_line2<30> ; # Customer Street 2 CHAR city_name<30> ; # City Name CHAR postal_code<10> ; # Postal code Postal or zip code CHAR state_code<2> ; # State code USA state code CHAR country_name<30> ; # Country Name CHAR phone_no1<20> ; # Phone Number 1 CHAR phone_no2<20> ; # Phone Number 2 CHAR fax_no<20> ; # Fax number CHAR e_mail<50> ; # Elctronic mail # Base/SC reference 15 # activity_status appears in many places and should probably be added # to base CHAR activity_status<16>; # Activity Status This customer account is Active, Inactive, De-activated # Base/SC reference 16 # The following 5 items are candidates for adding to base INT purchase_grp_id ; # Purchase group ID This customer is member of a purchasing group (CUSTOMER.purchase_grp_id = INT class_id ; # Customer class ID Customer classification as defined by the user INT territory_id ; # Customer territory Customer territory as defined by the user INT industry_id ; # Customer Industry ID Customer territory as defined by the user INT language_id ; # Language ID Language spoken at customer site CUSTOMER.language_id = LANGUAGE.language_id INT team_id ; # Sales team ID Sales team responsible for this customer INT term_id ; # Term of payment Default term of payment granted to this customer INT whs_id ; # Warehouse ID Default warehouse to serve this customer INT ship_to_id ; # Ship to ID Default Ship merchandises to this address (CUSTOMER.ship_to_id=CUSTOMER.cust_id) # Base/SC reference 17 # The following 2 items probably have commonality with purchasing and # therefore can become candidates for adding to base INT mail_to_id ; # Mail to Id Default mail invoice to this address(CUSTOMER.mail_to_id = CUSTOMER.cust_id) INT cur_id ; # Currency Identification Default billing currency INT ar_ctrl_acct_id ; # AR Control Account ID Receivable control GL account . Defaulted from CUR.ar_ctrl_acct_id INT ar_deposit_id ; # AR Deposit ID Customer deposits GL accounts. Defaulted from CUR.ar_deposit_id INT tax_id ; # Sales Tax Id Sales tax applicable for shipments to this address CUSTOMER.tax_id = TAX.tax_id # the following item is a duplicate of cur_id just above INT cur_id ; # Currency Identification Default billing curency CUSTOMER.cur_id = CUR.cur_id CHAR statement_type<16>; # Statement Type AR statement print for this customer, defaulted from ARPARAM.statement_type ``Open CHAR fin_charge_type<16>; # Finance Charges Type Apply Finance Charges for late payments, defaulted from ARPARAM ``Real'' INT carrier_id ; # Default Carrier Id Preferred carrier for shipping to this customer CUSTOMER.carrier_id=VENDOR.vendor_id INT ship_id ; # Shipping condition Id Preferred Shipping condition for this customer CUSTOMER.ship_id = SHIP.ship_id currency credit_limit ; # Credit Limit Amount of authorized credit granted to this customer INT price_list_id ; # Price group Id DATE create_date ; # Record Create date System date # Base/SC reference 18 # the following 2 items are candidates for adding to base::comm # edi_capable should probably be replaced with edi_protocol = none if # not edi capable Multiple protocols are evolving for edi. CHAR url_address<50> ; # URL address BOOL edi_capable ; # EDI Capable CHAR cust_note<100> ; # Customer Notes Customer note pad } # Base/SC reference 19 # emp covers the same area as base::person::employee # Except employee code needs to be added there. Many companies use # employee numbers and these need to be recorded as indicated here class emp { INT emp_id ; # Employee identification Serial Key Serial assigned by the program CHAR emp_code<8> ; # Employee code Code assigned by the user CHAR first_name<20> ; # Employee first Name CHAR last_name<20> ; # Employee last Name } # Many of the following items are switches for a program/method that # calculates the team commission. Implication = program needed. class team { INT team_id ; # Team identification Serial Key Serial assigned by the program CHAR team_code<8> ; # Team code Code assigned by the user CHAR team_name<30> ; # Team Name INT team_rate ; # Team Rate Rate of commission payable to this team CHAR com_base<16> ; # Commission base The commission is calculated on : Sales or Gross Margin BOOL tax_in_base ; # Taxes included in base amount Taxes are added to commissionable amount BOOL freight_in_base ; # Freight included in base amount Freight charges are added to commissionable amount BOOL inv_in_base ; # Sales Invoices in base amount Sales transactions to take into account to arrived at the commissionable base BOOL rma_in_base ; # RMA in base amount Returned merchandise credits added to base amount BOOL debit_in_base ; # Debit memo in base amount Debit Memos added to base amount BOOL credit_in_base ; # Credit memo in base Credit Memos added to base amount CHAR when_earned<16> ; # When Earned When is the commission considered earned to the salesman : At billing time, INT term_id ; # Term Identification When is the commission payable to the salesman. Terms of commission payment } class team2 { INT team2_id ; # Team2 identification Serial Key Serial assigned by the program CHAR team_id<8> ; # Team Identification TEAM.team_id = TEAM2.team_id INT emp_id ; # Employee identification TEAM2.emp_id = EMP.emp_id INT member_rate ; # Member Rate Rate of commission payable to this member of the team, 100% if no split commission } class sj { INT sj_id ; # Sales Journal Entry identification Serial Key Assigned by pgm DATE entry_date ; # Entry date Date the transaction was created in the table = System date DATE trans_date ; # Transaction Date The posting to the appropriate financial period/year is based on this date INT cust_id ; # Customer identification Bill to this account CHAR invoice_no<16> ; # Invoice number CHAR sj_type<16> ; # Sales journal type sales_type = Sales Invoice rma_type = Returned Merchandises debit_memo_type INT so_id ; # Sales Order identification Reference to the Sales Order INT cur_id ; # Currency Identification INT ar_ctrl_acct_id ; # Accounts Receivable Control GL Id Asset control account for receivables Defaulted from CUSTOMER.ar_ctrl_acct_id INT ar_deposit_id ; # AR Deposit Acount ID Liability control account for customer deposits Defaulted from CUSTOMER.ar_deposit_id INT trans_amnt ; # Transaction amount Amount posted to the GL control account (total of all lines) INT je_id ; # Journal Entry Identification Reference to the journal entry (updated by the Post to GL program) # Base/SC reference 20 # Currency rate of exchange and transaction foreign amount are # candidates for adding to Base::currency INT cur_rate ; # Currency rate of exchange currency frgn_amnt ; # Transaction foreign amount CHAR entry_stage<16> ; # Sales Journal Entry stage In progress, On approval, Posted to Subsidiary, Posted to GL INT reverse_sj_id ; # Reversing Sales Journal Entry Cross reference to reversing and reversed entries # Base/SC reference 21 # the next item + entry_date above are audit trail items # and candidates for a base # type and separate functionality in geas or elsewhere CHAR entry_by<20> ; # Sales Journal entered by Login name of the user creating the transaction # Base/SC reference 22 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR sub_post_by<20> ; # Subsidiary posting by Login name of the user having posted to the subsidiary receivables ledger DATE sub_post_date ; # Subsidiary posting date system date # Base/SC reference 23 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR gl_post_by<20> ; # General ledger posting by Login name of the user having posted the transaction to the GL DATE gl_post_date ; # General Ledger posting date system date INT link_doc_id ; # Linked document identification Reference to another sales transaction related to this one. For example we currency paid_amnt ; # Paid Amount This field is updated by Post Cash Receipt Pgm currency paid_frgn_amnt ; # Paid Foreign Amount This field is updated by Post Cash Receipt Pgm INT team_id ; # Sales team identification Sales team Identification INT term_id ; # Sales Terms Identification SJ.term_id = CUSTOMER.term_id = TERM.term_id Terms of payment for this transaction INT ship_to_id ; # Ship to ID Shipping address (SJ.ship_to_id = CUSTOMER.cust_id) INT mail_to_id ; # Mail to ID Mail the invoice to this address (SJ.mail_to_id = CUSTOMER.cust_id) CHAR sj_note<100> ; # Sales Journal Notes Invoice Note Pad } class sj2 { INT sj2_id ; # Sales journal line identification Serial Key Serial number assigned by the program INT sj_id ; # Sales Journal Identification SJ2.sj_id = SJ.sj_id CHAR line_type<16> ; # Line Type item_type = Item line tax_type = Tax line freight_type = Freight Line INT item_id ; # Item ID Defaulted from SO.SO2.item_id, if there is a Sales Order SJ2.item_id = ITEM_WHS.item_id INT gl_id ; # General ledger Account ID Defaulted from ITEM_WHS.sales_gl_id if (SJ2.line_type = ``item_type'') INT whs_id ; # Warehouse identification INT ssu_uom_id ; # Stock Selling Unit of measurement ID INT comm_rate ; # Commission rate Rate of commission payable on this line CHAR serial_no<20> ; # Serial number Serial number of the stock sold CHAR lot_no<20> ; # Lot number Lot number of the stock sold currency unit_price ; # Unit price Unit Price of the item sold in SSU currency unit_cost ; # Unit Cost Unit Cost of the item sold in SSU currency frgn_unit_price ; # Foreign Unit price Foreign Unit price in SSU # The ledger account identifications could probably be replaced by a # list using the gcd list syntax INT activity_id ; # Activity identification INT project_id ; # Project identification INT invoice_line ; # Invoice line sequence currency trans_amnt ; # Sales line transaction amount unit_price X trans_qty INT trans_qty ; # Sales line transaction quantity Number of item sold in Stock Selling Unit of Measurement currency frgn_amnt ; # Foreign amount frgn_unit_price X trans_qty CHAR trans_desc<100> ; # Sales transaction description } class cr { INT cr_id ; # Cash Receipt Journal Entry ID Serial Key Assigned by pgm DATE entry_date ; # Entry date Date the transaction was created in the table = System date DATE trans_date ; # Transaction Date The posting to the appropriate financial period/year is based on this date INT cust_id ; # Customer identification Payment received from this customer CHAR check_no<16> ; # Check number Customer Check Number CHAR cr_type<16> ; # Cash Receipt Journal Type payment_type = Check received from customer adjust_type = Adjustment to the INT bank_deposit_no ; # Bank Deposit number Reference to the bank deposit slip INT cur_id ; # Currency Identification INT cur_rate ; # Currency rate of exchange Defaulted from CUR.CUR2.sell_rate INT ar_ctrl_acct_id ; # Accounts Receivable Control account ID Accounts Receivable GL asset control account to be credited Default to CUSTOMER.ar_ctrl_acct_id INT bank_suspens_id ; # Bank Suspense Account ID Asset suspense account to track check received until the deposit slip is actually INT bank_acct_id ; # Bank Account ID Asset GL account to be debited when the money is sent to the bank currency trans_amnt ; # Transaction amount Check amount posted to the GL control account (total of all lines) currency frgn_amnt ; # Transaction foreign amount Foreign currency check amount INT je_id ; # Journal Entry Identification Reference to the journal entry (updated by the Post to GL program) # Base/SC reference 24 # The following 2 items appear in several places and are candidates for # adding to base and creation of types CHAR entry_stage<16> ; # Cash Receipt Journal Entry stage In progress, On approval, Posted to Subsidiary, Posted to GL INT reverse_cr_id ; # Reversing Cash Receipt Journal Entry Cross reference to reversing and reversed entries # Base/SC reference 25 # the next item + entry_date above are audit trail items # and candidates for a base # type and separate functionality in geas or elsewhere CHAR entry_by<20> ; # Cash Receipt Journal entered by Login name of the user creating the transaction # Base/SC reference 26 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR sub_post_by<20> ; # Subsidiary posting by Login name of the user having posted to the subsidiary receivables ledger DATE sub_post_date ; # Subsidiary posting date system date # Base/SC reference 27 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR gl_post_by<20> ; # General ledger posting by Login name of the user having posted the transaction to the GL DATE gl_post_date ; # General Ledger posting date system date CHAR cr_note<100> ; # Cash Receipt Note Note pad } class cr2 { INT cr2_id ; # Cash Receipt Journal line ID Serial Key Assigned by the program INT cr_id ; # Cash Receipt Journal ID CR2.cr_id = CR.cr_id INT sj_id ; # Sales Journal Id Reference to the invoice paid currency trans_amnt ; # Transaction amount Amount applied to this invoice currency frgn_amnt ; # Foreign amount Foreign amount applied to this invoice CHAR cr_type<16> ; # Cash receipt type Defaulted from CR.cr_type`` Payment'' or ``Adjustment'' or ``Reimbursement'' INT gl_id ; # General ledger account ID Default to CUR.ar_ctrl_acct_id if (cr_type = ``payment_type'') Default } class apparam { INT org_id ; # Organization Identification APPARAM.org_id = SYSPARAM.org_id } class vendor { INT vendor_id ; # Vendor identification Serial Key Serial number assigned by pgm CHAR vend_acct<8> ; # Vendor account Vendor code assigned by the user # Base/SC reference 28 # The following group of items is a variant of base::address and # base::comm CHAR vend_name<50> ; # Vendor name CHAR street_line1<30> ; # Vendor Street 1 CHAR street_line2<30> ; # Vendor Street 2 CHAR city_name<30> ; # City Name CHAR postal_code<10> ; # Postal code Postal or zip code CHAR country_name<30> ; # Country Name CHAR state_code<2> ; # State code USA state code CHAR url_address<50> ; # URL Address BOOL edi_capable ; # EDI Capable CHAR phone_no1<20> ; # Phone Number 1 CHAR phone_no2<20> ; # Phone Number 2 CHAR fax_no<20> ; # Fax number CHAR e_mail<50> ; # Elctronic mail # Base/SC reference 29 # As noted above, activity_status appears in many places and should # probably be added to base CHAR activity_status<16>; # Activity Status This vendor account is Active, Inactive, De-activated # Base/SC reference 30 # As noted above, the following 4 items are candidates for adding to base INT class_id ; # Vendor class ID Vendor classification as defined by the user INT territory_id ; # Vendor territory Vendor territory as defined by the user INT industry_id ; # Vendor Industry ID Vendor territory as defined by the user INT language_id ; # Language ID Language spoken at vendor site VENDOR.language_id = LANGUAGE.language_id INT term_id ; # Term of payment Term of payment granted by this vendor INT whs_id ; # Warehouse ID Default warehouse for merchandises received from this vendor INT cur_id ; # Currency Identification Default purchasing currency INT ap_ctrl_acct_id ; # AP Control Account ID Payable Control GL Account defaulted from CUR.ap_ctrl_acct_id INT ap_deposit_id ; # AP Deposit Account Id Asset GL account to track deposit on PO, defaulted from CUR.ap_deposit_id INT tax_id ; # Sales Tax Id Taxes applicable for shipments from this vendor INT carrier_id ; # Default Carrier Id Preferred carrier with this vendor, VENDOR.carrier_id = VENDOR.vendor_id INT ship_id ; # Shipping condition Id Preferred Shipping condition with this vendor CHAR vendor_note<100> ; # Vendor Note Vendor note pad } class soparam { INT org_id ; # Organization Identification SOPARAM.org_id = SYSPARAM.org_id INT next_so_no ; # Next Sales Order number Next Sales Order Number INT next_ss_no ; # Next Stock Shipping Number Next voucher number (Stock Shipping Journal) } class so { INT cust_id ; # Customer identification SO.cust_id = CUST.cust_id INT so_id ; # Sales Order Journal Entry ID Serial Key Assigned by the pgm CHAR so_no<16> ; # Sales Order number Number assigned by the user or the pgm INT org_id ; # Organization Id Organization receiving the sales order DATE entry_date ; # Record creation date System date DATE trans_date ; # Transaction date Document date and accounting date CHAR so_type<16> ; # Sales Order Type Proposal to customer, Sales Order, Sales Order with customer deposit, Return CHAR so_status<16> ; # Sales Order Status Outstanding, Lost, Cancelled, Completed BOOL full_order_ship ; # Full Order Shipment Ship all items and all stated quantities (only one shipment required) BOOL full_qty_ship ; # Full quantity Shipment Ship stated quantities for every item shipped INT ar_deposit_id ; # AR Deposit Id Liability GL control account to track customer deposits Defaulted from CUSTOMER.ar_deposit_id INT ar_dep_offset_id ; # AR Deposit Offset Account ID Defaulted from CUR.ar_dep_offset_id currency trans_amnt ; # Transaction Amount Total of all SO lines currency frgn_amnt ; # Foreign Amount Total of all SO lines currency deposit_amnt ; # Deposit amount Customer deposit amount CHAR deposit_check_no<8>; # Deposit Check number Customer check number INT je_id ; # Journal Entry Identification Reference to the journal entry created by Post to GL pgm. (If there is a customer # Base/SC reference 31 # As noted above, the following 2 items appear in several places # and are candidates for adding to base and creation of types CHAR entry_stage<16> ; # SO Entry Stage In progress, On approval, Posted to Subsidiary, Posted to GL INT reverse_so_id ; # Reversing Sales Journal Entry Cross reference to reversing and reversed entries # Base/SC reference 32 # the next item + entry_date above are audit trail items # and candidates for a base # type and separate functionality in geas or elsewhere CHAR entry_by<20> ; # Purchase Order created by Login name of the user creating the transaction # Base/SC reference 33 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR sub_post_by<20> ; # Subsidiary posting by Login name of the user having posted to the subsidiary payable ledger DATE sub_post_date ; # Subsidiary posting date System Date # Base/SC reference 34 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR gl_post_by<20> ; # General Ledger Posting by Login name of the user having posted the transaction to the GL DATE gl_post_date ; # General Ledger posting date System date # Base/SC reference 35 # The following group of items suggest that a class of "addressee" # is needed in base. This would be a title and contact information # without a person name. There could be a list of class "contact" that # indicates the related person(s). Thus, an addressee could be # "Purchasing Department, Megalith Industries, street, etc." with a list # of persons (the actual purchasing manager, purchasing agents, etc) # associated. CHAR ack_require<16> ; # Acknowledgement required Verbal, E-Mail, Mail CHAR ack_to_name<20> ; # Acknowledge to this person Acknowledgement sent to this person CHAR ack_to_phone<20> ; # Acknowledge to phone Acknowledgement sent to this phone number CHAR ack_to_e_mail<50>; # Acknowledge to e-mail Acknowledgement sent to this E-mail address CHAR ack_address<100> ; # Acknowledge address Acknowledgement mail to this address INT ship_to_id ; # Ship To ID SO.ship_to_id = CUST.ship_to_id Shipping address INT mail_to_id ; # Mail Invoice to SO.mail_to_id = CUST.cust_id Another customer address in CUST table INT whs_id ; # Warehouse id Warehouse where merchandise is to be sent from Defaulted from CUSTOMER.whs_id INT emp_id ; # Employee ID Our employee taking the order SO.emp_id = EMP.emp_id CHAR contact_id<50> ; # Contact Identification Customer contact the SO has been negociated with SO.contact_id = CONTACT.cust_id INT term_id ; # Term of payment Term of payment granted to this customer Defaulted from CUSTOMER.term_id INT cur_id ; # Currency Identification Selling curency. Defaulted from CUSTOMER.cur_id currency cur_rate ; # Currency Rate Defaulted from CUR.CUR2.sell_rate INT carrier_id ; # Carrier ID Defaulted from CUSTOMER.carrier_id INT ship_id ; # Shipping condition Id Shipping condition for this SO, Defaulted from CUSTOMER.ship_id CHAR so_note<100> ; # Sales Order Note Sales order NotePad } class so2 { INT so_id ; # Sales order ID SO2.so_id = SO.so_id INT so2_id ; # Sales Order detail Id Serial Key Assigned by the pgm CHAR line_type<16> ; # Line Type ``Item_type'' or ``tax_type'' or ``freight_type'' INT item_id ; # Item id Our item identification SO2.item_id = ITEM.item_id = ITEM_WHS.item_id CHAR item_descript<100>; # Item description Our description CHAR part_no<30> ; # Part number Customer part number CHAR part_name<50> ; # Part name Customer part description INT ssu_uom_id ; # Stock Selling Unit of measure SO2.ssu_uom_id = UOM.uom_id currency ssu_price ; # Unit price Item Price per Stock Selling Unit } class so3 { INT so2_id ; # Sales order detail Id SO3.so2_id = SO2.so2_id INT so3_id ; # Sales Order detail detail id Serial Key Assigned by the pgm INT whs_id ; # Warehouse ID Warehouse where merchandise is to be sent from SO3.whs_id = WHS.whs_id BOOL full_qty_ship ; # Full Quantity Shipment Yes = Ship only the exact ordered quantities, No = Partial quantities accepted Default DATE request_date ; # Request date Customer requested shipping date DATE promise_date ; # Promise date Probable shipping date as promise to customer INT order_qty ; # Order Quantity Requested quantity for this date INT ship_qty ; # Received quantity Quantity currently shipped (Updated by Stock Shipping Pgm) INT cancel_qty ; # Cancelled quantity Quantity currently cancelled (Updated by Stock Shipping Pgm) INT ship_to_id ; # Ship To ID SO3.ship_to_id = CUST.cust_id Shipping address (allow for multi-drop shipment) } class poparam { INT org_id ; # Organization Identification POPARAM.org_id = SYSPARAM.org_id BOOL use_commit_acct ; # Use commitment Accounting Liability incurred by agreeing to buy (when a PO is issued) Liability reversed INT default_whs_id ; # Default Warehouse BOOL accrue_rcvd_good ; # Record Accrued Received Goods Liability incurred when stock is received Liability reversed when invoice is INT commit_gl_id ; # Commitment GL Id Liability GL Account to record PO issued INT accrual_gl_id ; # Accrual GL Id Accrued Liability GL Account to record Stock received # The following 7 items are candidates for creation of a class and # handling in a list using gcd list syntax. Each item on the list # represents one of the kinds of documents used in the purchasing process # for the organization. The class would include fields of: document, next # number, and number changeable INT next_po_no ; # Next PO number Next Purchase Order Number BOOL po_no_chg ; # PO Number Changeable The proposed PO number can be changed by the user. INT next_sr_no ; # Next Stock Receiving Number Next voucher number (Stock Receiving Journal) INT next_purc_req_no ; # Next Purchase Requisition Number BOOL purc_rec_no_chg ; # Purchase Requisition Number Changeable The proposed PR number can be changed by the user. INT nex_req_quote_no ; # Next Request for Quotation Number BOOL req_quote_no_chg ; # Request for Quotation Number Changeable The proposed RQ number can be changed by the user. INT deposit_gl_id ; # Deposit GL ID Asset GL control account to record deposit made to vendor } # Base/SC reference 36 # The following table needs to be coordinated with sc::purchasing class po { INT vendor_id ; # Vendor identification PO.vendor_id = VENDOR.vendor_id INT po_id ; # Purchase Journal Entry ID Serial Key Assigned by the pgm CHAR po_number<16> ; # Purchase Order Number Number assigned by the user or the pgm as per POPARAM.po_no_chg CHAR purc_req_no<16> ; # Purchase Requisition Number Number assigned by the user or the pgm as per POPARAM.purc_rec_no_chg CHAR req_quote_no<16> ; # Request for Quotation Number Number assigned by the user or the pgm as per POPARAM.req_quote_no_chg INT org_id ; # Organization Id Organization issuing the purchase order DATE entry_date ; # Record creation date System date DATE trans_date ; # Transaction date Document date and Accounting date CHAR po_type<16> ; # Purchase Order Type Purchase Requisition, Request for Quotation, Purchase Order, Request to return CHAR po_status<16> ; # Purchase order Status Outstanding, Cancelled, Completed BOOL full_order_ship ; # Full Order Shipment Ship all items and all stated quantities (only one shipment required) BOOL full_qty_ship ; # Full quantity Shipment Ship stated quantities for every item shipped INT ap_ctrl_acct_id ; # AP Control Account Id Payable Liabilities GL account Defaulted from VENDOR.ap_ctrl_acct_id INT ap_deposit_id ; # AP Deposit ID Asset GL account to track deposit on PO, Defaulted from VENDOR.ap_deposit_id currency trans_amnt ; # Transaction Amount Total of all PO lines currency frgn_amnt ; # Foreign Amount Total of all PO lines currency deposit_amnt ; # Deposit Amount Deposit made to vendors INT check_no ; # Check Number Deposit check number INT je_id ; # Journal Entry Identification Reference to the journal entry created by Post to GL pgm. (If Commitment accounting # Base/SC reference 37 # As noted above, the following 2 items appear in several places # and are candidates for adding to base and creation of types CHAR entry_stage<16> ; # PO Entry Stage In progress, On approval, Posted to Subsidiary, Posted to GL INT reverse_po_id ; # Reversing Purchase Journal Entry Cross reference to reversing and reversed entries # Base/SC reference 38 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR purc_req_by<20> ; # Purchase requisition created by Login name of the user entering the purchase requisition DATE purc_req_date ; # Purchase Requisition Date System Date # Base/SC reference 39 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR req_quote_by<20> ; # Request for Quotation Entered by Login name of the user creating the Request for Quotation or converting the DATE req_quote_date ; # Request for Quotation Date System date # Base/SC reference 40 # the next item + entry_date above are audit trail items # and candidates for a base # type and separate functionality in geas or elsewhere CHAR entry_by<20> ; # Purchase Order created by Login name of the user creating the PO or converting Request for Quotation # Base/SC reference 41 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR sub_post_by<20> ; # Subsidiary posting by Login name of the user having posted to the subsidiary payable ledger DATE sub_post_date ; # Subsidiary posting date System Date # Base/SC reference 42 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR gl_post_by<20> ; # General Ledger Posting by Login name of the user having posted the transaction to the GL DATE gl_post_date ; # General Ledger posting date System date # Base/SC reference 43 # As noted above the following items suggest adding a class of "addressee" # in base. This would be a title and contact information # without a person name. There could be a list of class "contact" that # indicates the related person(s). CHAR ack_require<16> ; # Acknowledgement required Verbal, E-Mail, Mail CHAR ack_to_name<20> ; # Acknowledge to this person Acknowledgement sent to this person CHAR ack_to_phone<20> ; # Acknowledge to phone Acknowledgement sent to this phone number CHAR ack_to_e_mail<50>; # Acknowledge to e-mail Acknowledgement sent to this E-mail address CHAR ack_address<100> ; # Acknowledge address Acknowledgement mail to this address INT mail_to_id ; # Mail Invoice to PO.mail_to_id = WHS.whs_id INT whs_id ; # Warehouse id Warehouse where merchandise is to be sent to PO.whs_id = WHS.whs_id INT emp_id ; # Employee ID Our employee issuing the order PO.emp_id = EMP.emp_id CHAR contact_id<50> ; # Contact Identification Vendor contact the PO has been negociated with PO.contact_id = CONTACT.vendor_id INT term_id ; # Payment Terms Terms granted by this vendor Defaulted from VENDOR.term_id INT cur_id ; # Currency Identification Purchasing currency, Defaulted from VENDOR.cur_id INT cur_rate ; # Currency rate Defaulted from CUR.CUR2.purchase_rate INT carrier_id ; # Carrier ID Preferred carrier for this PO, Defaulted from VENDOR.carrier_id INT ship_id ; # Shipping Conditions Id Delivery terms for this PO, Defaulted from VENDOR.ship_id CHAR po_notes<100> ; # Purchase Order Note Purchase Order Note Pad } # Base/SC reference 44 # The following table needs to be coordinated with sc::purchasing class po2 { INT po_id ; # Purchase order ID PO2.po_id = PO.po_id INT po2_id ; # Purchase Order detail Id Serial Key Assigned by the pgm INT line_number ; # Line Number PO Line number CHAR line_type<16> ; # Line Type ``Item_type'' or ``tax_type'' or ``freight_type'' INT item_id ; # Item id Item Ordered PO2.item_id = ITEM.item_id = ITEM_WHS.item_id CHAR item_descript<100>; # Item description Our Item description CHAR part_no<30> ; # Part number Vendor part number CHAR part_name<50> ; # Part name Vendor part description INT spu_uom_id ; # Stock purchasing Unit of measure PO2.spu_uom_id = UOM.uom_id currency spu_cost ; # Unit cost Item cost per Stock Purchasing Unit } # Base/SC reference 45 # The following table needs to be coordinated with sc::purchasing class po3 { INT po2_id ; # Purchase order detail Id PO3.po2_id = PO2.po2_id INT po3_id ; # Purchase Order detail detail id Serial Key Assigned by the pgm INT gl_acct_id ; # GL Account Id Asset or expense GL account (counterpart of PO.ap_ctrl_acct_id) Default INT whs_id ; # Warehouse ID Warehouse where merchandise is to be sent to PO3.whs_id = WHS.whs_id # The ledger account identifications could probably be replaced by a # list using the gcd list syntax INT activity_id ; # Activity ID INT project_id ; # Project ID BOOL full_qty_ship ; # Full Quantity Shipment Yes = Ship only the exact ordered quantities, No = Partial quantities accepted Default DATE request_date ; # Requested date Asked shipping date DATE promise_date ; # Promised date Probable shipping date as promise by vendor INT order_qty ; # Order Quantity Requested quantity for this date INT receive_qty ; # Received quantity Quantity currently received (Updated by Stock Receiving Pgm) INT cancel_qty ; # Cancelled quantity Quantity currently cancelled (Updated by Stock Receiving Pgm) INT purc_req_qty ; # Purchase requisition quantity Quantity requested may be different from the ordered quantity } class sr { INT vendor_id ; # Vendor identification SR.vendor_id = VENDOR.vendor_id CHAR packing_slip<16> ; # Packing Slip Vendor delivery slip CHAR invoice_no<20> ; # Invoice Number Vendor invoice number DATE invoice_date ; # Invoice Date Payable accounting date INT sr_id ; # Stock Receiving Journal ID Serial Key Assigned by pgm INT po_id ; # Purchase Order Journal Entry ID SR.po_id = PO.po_id INT org_id ; # Organization Id Organization receiving the goods DATE entry_date ; # Record Creation Date System date DATE trans_date ; # Transaction date Stock Receiving date and accrual accounting date INT accrual_gl_id ; # AP Control Account Id Liability GL account to accrue received goods SR.accrual_gl_id = POPARAM.accrual_gl_id INT ap_ctrl_acct_id ; # AP Control Account ID Payable Control Account, Defaulted from PO.ap_ctrl_acct_id currency trans_amnt ; # Transaction Amount Total of all SR2 lines currency frgn_amnt ; # Foreign Amount Total of all SR2 lines INT je_id ; # Journal Entry Identification Reference to the journal entry created by Post to GL pgm. If (POPARAM.accrue_rcvd_good CHAR entry_stage<16> ; # Receiving Journal Entry Stage In progress, On approval, Posted to Subsidiary, Posted to GL # Base/SC reference 46 # As noted above, the following 2 items appear in several places # and are candidates for adding to base and creation of types INT reverse_sr_id ; # Reversing Receiving Journal Entry Cross reference to reversing and reversed entries CHAR entry_by<20> ; # Journal Entry by Login name of the user creating the transaction # Base/SC reference 47 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR sub_post_by<20> ; # Subsidiary posting by Login name of the user having posted to the subsidiary payable ledger DATE sub_post_date ; # Subsidiary posting date System Date # Base/SC reference 48 # these next 2 items are audit trail items and candidates for a base # type and separate functionality in geas or elsewhere CHAR gl_post_by<20> ; # General Ledger Posting by Login name of the user having posted the transaction to the GL DATE gl_post_date ; # General Ledger posting date System date INT whs_id ; # Warehouse id Warehouse where merchandise is received SR.whs_id = WHS.whs_id INT emp_id ; # Employee ID Receiving Clerk doing the quantity and quality check SR.emp_id = EMP.emp_id INT cur_id ; # Currency Identification Purchasing currency, SR.cur_id = PO.cur_id = CUR.cur_id INT cur_rate ; # Currency rate Defaulted from CUR.CUR2.purchase_rate currency carrier_id ; # Carrier Id Carrier for this receiving, SR.carrier_id = VENDOR.vendor_id } class sr2 { INT sr_id ; # Stock Receiving Journal ID SR2.sr_id = SR.sr_id INT sr2_id ; # Stock Receiving Detail ID Serial Key Assigned by pgm INT po2_id ; # Purchase Order detail Id CHAR line_type<16> ; # Line Type Defaulted from PO2.line_type ``Item_type'' or ``tax_type'' or INT whs_id ; # Warehouse ID Defaulted from PO3.whs_id # The ledger account identifications could probably be replaced by a # list using the gcd list syntax INT activity_id ; # Activity ID Defaulted from PO3.activity_id INT project_id ; # Project ID Defaulted from PO3.project_id INT gl_acct_id ; # General Ledger Account ID GL Asset account SR2.gl_acct_id = WHS. SR2.gl_acct_id = PO3.gl_acct_id INT item_id ; # Item id Our item identification SR2.item_id = ITEM.item_id = ITEM_WHS.item_id INT receive_qty ; # Received quantity Counted quantity INT cancel_qty ; # Cancelled quantity Quantity not shipped and will not be shipped CHAR cancel_code<8> ; # Cancellation code Reason for cancellation INT reject_qty ; # Rejected quantity Items rejected at quality inspection CHAR reject_code<8> ; # Reject Code Reason for rejection of the item CHAR serial_no<20> ; # Serial Number Serial number of the item received CHAR lot_no<20> ; # Lot Number Lot Number (if lot controlled) CHAR part_no<30> ; # Part number Vendor part number CHAR part_name<50> ; # Part name Vendor part description currency spu_cost ; # Unit Cost Item Price per Stock Purchasing Unit INT spu_uom_id ; # Stock purchasing Unit of measure SR2.spu_uom_id = UOM.uom_id } class icparam { INT org_id ; # Organization Id ICPARAM.org_id = SYSPARAM.org_id } class whs { INT whs_id ; # Warehouse Identification Serial Key Assigned by the pgm INT org_id ; # Organization Id WHS.whs_id = SYSPARAM.org_id CHAR whs_code<8> ; # Warehouse Code Assigned by the user CHAR whs_name<50> ; # Warehouse Name DATE create_date ; # Create Date Record creation date # Base/SC reference 49 # The following group of items is a variant of base::address and # base::comm CHAR street_line1<30> ; # Street Warehouse address CHAR street_line2<30> ; # Street CHAR city_name<30> ; # City CHAR postal_code<10> ; # Postal code CHAR country_name<30> ; # Country CHAR phone_no1<20> ; # Warehouse Phone 1 CHAR phone_no2<20> ; # Warehouse Phone 2 CHAR fax_no<20> ; # Warehouse fax CHAR e_mail<50> ; # Warehouse email CHAR whs_mgr<30> ; # Warehouse manager INT tax_id ; # Tax ID This tax code is use to determine if we are shipping within or across jurisdictions. INT stock_ctrl_gl_id ; # Stock Control GL Id Asset account to record value of items on hand } # Base/SC reference 50 # The following table needs to be coordinated with base::item and # sc::item class item { INT item_id ; # Item Identification Serial Key Assigned by the pgm CHAR item_code<23> ; # Item Codification Assigned by the user CHAR short_desc<30> ; # Short description Item Short description CHAR long_desc<100> ; # Long Description Item Long Description INT item_type_id ; # Item Type ID ITEM.item_type_id = ITEM_TYPE.item_type_id CHAR bar_code<20> ; # Bar Code Universal Product Code INT item_class_id ; # Item Classification ID ITEM.item_class_id = ITEM_CLASS.item_class_id INT item_line_id ; # Item Line ID ITEM.item_line_id = ITEM_LINE.item_line_id CHAR activity_status<16>; # Activity status Active, Inactive, De-activated INT substitute_id ; # Substitute Item ID ITEM.substitute_id = ITEM.item_id INT qty_decimal ; # Quantity Decimals Number of decimal to express the quantity of an item INT sku_uom_id ; # SKU Uom ID Stock Keeping Unit of measurement Quantity on hand is in sku ITEM.sku_uom_id INT ssu_uom_id ; # Ssu Uom ID Stock Selling Unit on measurement Invoicing/shipping uses this unit ITEM.ssu_uom_id INT spu_uom_id ; # Spu Uom ID Stock Purchasing Unit of measurement Purchasing/receiving uses this unit ITEM.spu_uom_id INT ssu_to_sku ; # Factor Factor to go from SSU to one SKU INT spu_to_sku ; # Factor Factor to go from SPU to one SKU # Base/SC reference 51 # The various uom items could probably be replaced by a list using the # gcd list syntax INT sku_volume ; # Sku Volume Volume of the item for one stock keeping unit INT volume_uom_id ; # Volume Uom ID Unit of measurement for the volume of the item ITEM.volume_uom_id = UOM..uom_id INT sku_weight ; # Sku Weight Weight of the item for one stock keeping unit INT weight_uom_id ; # Weight Uom ID Unit of measurement for the weight of the item ITEM.weight_uom_id = UOM.uom_id INT sku_height ; # Sku Height Height of the item for one stock keeoing unit INT height_uom_id ; # Height Uom ID Unit of measurement for the height of the item ITEM.height_uom_id = UOM.uom_id INT sku_width ; # Sku Width Width of the item for one stock keeping unit INT width_uom_id ; # Width Uom ID Unit of measurement for the width of the item ITEM.width_uom_id = UOM.uom_id INT sku_length ; # Sku Length Length of the item for one stock keeping unit INT lenght_uom_id ; # Length Uom Id Unit of measurement for the length of the item ITEM.length_uom_id = UOM.uom_id INT sku_surface ; # Sku Surface Surface of the item for one stock keeping unit INT surface_uom_id ; # Surface Uom ID Unit of measurement for the surface of the item ITEM.surface_uom_id = UOM.uom_id BOOL check_on_hand ; # Check on hand quantity While taking sales orders and invoicing, check quantity available CHAR ctrl_method<16> ; # Control Method Bulk Control, Serial Control, Lot Control, Serial-Lot Control, No Control DATE create_date ; # Create Date Record creation date currency std_cost ; # Standard Cost Standard Cost BOOL allow_neg_qty ; # Allow negative quantity Allow quantity on hand to become negative CHAR cost_method<16> ; # Costing method Last In First Out : LIFO method, First In First Out : FIFO method, Weighted } class item_whs { INT item_id ; # Item Identification ITEM_WHS.item_id = ITEM.item_id INT item_whs_id ; # Item Warehouse ID Serial Key Assigned by the pgm INT whs_id ; # Warehouse Identification ITEM_WHS.whs_id = WHS.whs_id DATE create_date ; # Create Date Record creation date INT stock_ctrl_gl_id ; # Stock Control Account ID GL asset control account to record the value of the stock on hand Default from INT sales_gl_id ; # Sales GL ID GL Revenue Account to record merchandise sold to customers INT return_gl_id ; # Return GL ID GL Negative revenue account to record the value of merchandise returned by customers INT discount_gl_id ; # Discount GL ID GL Expense account or negative revenue account to record trade discounts INT cogs_gl_id ; # COGS GL ID GL Cost of goods sold account INT order_point ; # Order point Minimum quantity to keep on hand in sku INT eco_order_qty ; # Economic order quantity Economic order quantity in sku INT qty_on_hand ; # Quantity on hand Quantity currently on hand in sku INT qty_on_po ; # Quantity on purchase orders Quantity currently on outstanding purchase orders in sku INT qty_on_so ; # Quantity on Sales Order Quantity currently on outstanding sales orders in sku INT qty_in_process ; # Quantity in process Quantity currently in the manufacturing process in sku (for manufactured item) INT qty_on_wo ; # Quantity on work order Quantity currently reserved for work orders in sku INT qty_in_transit ; # Quantity in transit Quantity being moved between warehouses in sku currency unit_cost ; # Unit Cost Item Unit cost per sku INT tax_id ; # Tax ID Taxation authority } class item_price { INT item_id ; # Item Identification ITEM_PRICE.item_id = ITEM.item_id INT item_price_id ; # Item price ID Serial Key Assigned by the pgm DATE create_date ; # Create Date Record creation date } class item_type { INT item_type_id ; # Item Type ID Serial Key ITEM_TYPE.item_type_id = ITEM.item_type_id CHAR type_code<8> ; # Type Code Assigned by the user DATE create_date ; # Create Date Record creation date CHAR activity_status<16>; # Activity Status Active, Inactive , Deactivated CHAR type_desc<100> ; # Item Type Description } class item_class { INT item_class_id ; # Item Class ID Serial Key ITEM_CLASS.item_id = ITEM.item_class_id CHAR class_code<8> ; # Class Code Assigned by the user DATE create_date ; # Create Date Record creation date CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated CHAR class_desc<100> ; # Class Description } class item_line { INT item_line_id ; # Item Line ID Serial Key ITEM_LINE.item_id = ITEM.item_id CHAR line_code<8> ; # Line Code Assigned by the user DATE create_date ; # Create Date Record creation date CHAR activity_status<16>; # Activity Status Active, Inactive, Deactivated CHAR line_desc<100> ; # Line Description } class item_vendor { INT item_id ; # Item Identification ITEM_VENDOR.item_id = ITEM.item_id INT item_vendor_id ; # Item Vendor ID Serial Key Assigned by the pgm DATE create_date ; # Create Date Record creation date INT vendor_id ; # Vendor Id ITEM_VENDOR.vendor_id = VENDOR.vendor_id CHAR part_no<30> ; # Part number Vendor part number CHAR part_name<50> ; # Part name Vendor part description INT spu_uom_id ; # Stock Purchasing Unit of measure ID ITEM_VENDOR.spu_uom_id = UOM.uom_id CHAR vendor_rating<1> ; # Vendor rating A code to indicate the prefered vendor currency last_price ; # Last price Last quote or purchase price INT currency_id ; # Currency Id Currency of the last price } # Duplicates emp above class emp { INT emp_id ; # Employee Identification Serial Key Serial assigned by the program CHAR emp_code<8> ; # Employee Code Codification assigned by the user CHAR first_name<20> ; # First Name CHAR last_name<20> ; # Last Name # # # The file below is a concatenated version of all the gcd in Base # and supply chain. All but one copyright notice have been deleted to # shorten the file. # # # Copyright (C) 2001 Free Software Foundation, Inc. # # This file is part of GNU Enterprise. # # GNU Enterprise is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # GNU Enterprise is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Enterprise; see the file COPYING. If not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA. # # New items suggested by accounting base/sc reference numbers: # 3, 5, 7, 8, 11, 12, 15, 16, 21, 22, 23, 24, 25, 26, 27, 29, # 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 46, 47, 48 # (many related or duplicated) # # # $RCSfile: company.gcd,v $ - physical address type # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.3 $ $Date: 2001/05/15 17:18:17 $ $Author: ntiffin $ # include "../../../base/person/classes/person.gcd" include "../../../base/location/classes/address.gcd" module company # Affected by accounting base/sc reference numbers: 9, 13, 35, 43 { # ------------------------------------------------------------------------- # base class for instantiating person type as a general contact # ------------------------------------------------------------------------- class contact { person::person name; char code<8>; # type of contact }; # ------------------------------------------------------------------------- # base class for instantiating address type as a company address # ------------------------------------------------------------------------- class address { location::address address; }; # ------------------------------------------------------------------------- # base class for vendor and customer classes # ------------------------------------------------------------------------- class company { char companyname<80>; # NOT NULL company::address [] address; company::contact [] contact; char keyword<100>; # keyword for searching INDEX (companyname); }; }; # currency.gcd # Affected by accounting base/sc reference numbers: 6, 10, 20 # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.11 $ $Date: 2001/05/05 00:35:08 $ $Author: ntiffin $ # # =========================================================================== # currency - # =========================================================================== module currency { # type currency_code_type = char<3>; # ------------------------------------------------------------------------- # currency - definition of currencies. # ------------------------------------------------------------------------- class currency { char code<8>; char description<25>; int default_decimals; INDEX (code); }; # ------------------------------------------------------------------------- # money - definition of money. # ------------------------------------------------------------------------- type money { # this definition allows us to abstract # qtys as needed. # todo amount should be 64 bit integer. int amount = 0; # this integer has an implied decimal point # for example if amount = 456192 int num_decimals = 2; # and numDecimals = 3 # then amount really has a value of 456.192 char code<8>; REFERENCE currency_reference : currency::currency( code ) = this.code; # select the system configured default currency #INITIALISE code = currency_reference(code = # $system.default_currency_code ); # read the number of decimals from the selected # currency object #INITIALISE num_decimals = code.default_decimals; }; # ------------------------------------------------------------------------- # conversion_rule - rules for converting different currencies. # ------------------------------------------------------------------------- class conversion_rule { currency::currency *to; float numerator = 1; # the conversion float denominator = 1; # factor = numerator/denominator date begin; date end; }; # ------------------------------------------------------------------------- # conversion - convert between different currencies. # ------------------------------------------------------------------------- class conversion { currency::currency *base; currency::conversion_rule [] rule; }; }; # base_item.gcd # Affected by accounting base/sc reference number: 50 # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.3 $ $Date: 2001/05/01 20:17:47 $ $Author: ntiffin $ # module base_item { # ------------------------------------------------------------------------- # item_type - # ------------------------------------------------------------------------- class item_type { char code<8>; char description<100>; }; # ------------------------------------------------------------------------- # item - # ------------------------------------------------------------------------- class item { char item_code<23>; char short_desc<30>; char long_desc<100>; char keywords<250>; # free form keywords used to look up this item # this is not meant to replace specifications # defined in other classes. char type_code<8>; help en item_code "Internal part code for this item."; help en short_desc "For use on screens and other limited spaces."; help en long_desc "For mostly external use on reports, purchase" "orders and other places where clarity is" "required."; UNIQUE INDEX ( item_code ); }; }; # language.gcd # Affected by accounting base/sc reference number: 2 # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.6 $ $Date: 2001/05/19 01:09:58 $ $Author: ntiffin $ # # =========================================================================== # language - language dependent stuff goes here. # =========================================================================== module language { # ------------------------------------------------------------------------- # definition of languages. # ------------------------------------------------------------------------- class language { char code<8>; char dialect<8>; char description<25>; }; # ------------------------------------------------------------------------- # default language dependent data for use by forms and reports # to assist the user. # ------------------------------------------------------------------------- class help { char module_name<25>; char class_name<25>; # table char field_name<25>; # column char language_code<8>; char dialect_code<8>; char help_text<1000>; # full help text if the user clicks on help. char help_keywords<100>; # keywords to help for searches. char tool_tip<50>; # short help when the user's mouse passes over # the field. char label<25>; # default label for this data, used for # both reports and forms. char default_text<100>; # default text data for new fields. }; }; # $RCSfile: address.gcd,v $ - physical address type # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.9 $ $Date: 2001/05/06 22:20:20 $ $Author: ntiffin $ # module location # Affected by accounting base/sc reference numbers: 1, 14, 28, 49 { class region { char code<8>; # state/region abbrev char desc<35>; # long state/region name }; class country { char phone_code<4>; # for validating phone country code char code<8>; # for validating address country abbreviation char description<35>; # the long country name location::region []regions; # regions or states within country char city_format<35>; # formatting template for the city/postal code # address line UNIQUE INDEX(code); }; # ------------------------------------------------------------------------- # address - definition of physical addresses. # ------------------------------------------------------------------------- type address { char desc<35>; # of this address (work, home, business etc.) char street1<35>; char street2<35>; char street2<35>; char city<35>; location::region *region; # state in the US location::country *country; char postal<17>; # get the place as city, state, zip per local requirements text get_place(); }; }; # $RCSfile: person.gcd,v $ - Definition of person module. # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.16 $ $Date: 2001/05/24 14:01:26 $ $Author: ntiffin $ # include "../../../base/location/classes/address.gcd" module person # Affected by accounting base/sc reference numbers: 1, 14, 18, 19, 28, 49 { # ---------------------------------------------- # list of personal titles placed before name # and are acceptable for this installation. # ---------------------------------------------- class name_prefix { char prefix<25>; # Mr. Ms Dr. etc. # AR. ADir i.R. # Dr. phi. h.c. HR Dipl.-Ing. }; # ---------------------------------------------- # list of characters that follow the name # and are acceptable for this installation. # ---------------------------------------------- class name_suffix { char suffix<8>; # Jr. III Sr. etc. }; # ---------------------------------------------- # comm_type - phone, fax, email etc. # ---------------------------------------------- class comm_type { char code<8>; char format<70>; # format of comm::address # for decoding the address # example: # 1-630-555-1212 # cc-a/c-number # usage TBD (to be determined) char desc<35>; }; # ---------------------------------------------- # comm - communications: phone, fax, email etc. # ---------------------------------------------- class comm { person::comm_type *atype; char address<70>; char remark<70>; }; # ---------------------------------------------- # class to instantiate address type # ---------------------------------------------- class address { location::address address; }; # ---------------------------------------------- # person - # ---------------------------------------------- type person { char name_prefix<8>; # Mr. Ms Dr. char name_first<25>; # given or first name char name_middle<25>; # other name(s), not surname or first char name_last<25>; # surname or family name char name_suffix<8>; # Jr. Sr. III char name_informal<25>; # nickname char work_title<25>; # president, vice president person::address [] address; # home, work address person::comm [] comm; # email, phone, fax, web #text get_full_name(); # Mr. Frank N. Furter Sr. #text get_polite_name(); # Mr. Furter }; # ---------------------------------------------- # department - # ---------------------------------------------- class department { char code<8>; char desc<35>; }; # ---------------------------------------------- # employee - # ---------------------------------------------- class employee { char code<8>; # employee designation person::person person; person::department *department; }; }; # $RCSfile: units.gcd,v $ - quantities and units of measure # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.17 $ $Date: 2001/05/20 23:16:06 $ $Author: ntiffin $ # module unit # Affected by accounting base/sc reference number: 4 { # ------------------------------------------------------------------------- # unit - unit of measure # ------------------------------------------------------------------------- class unit { # keeps track of the different units char code<8>; # of measure char desc<35>; # used in GNUe. int decimals = 0; # default decimals for this unit }; # ------------------------------------------------------------------------- # quantity - # ------------------------------------------------------------------------- type quantity { # this definition allows us to abstract # quantities as needed # for example if value = 456192 int value = 0; # only integer quantities int decimals = 2; # and decimals = 3 # then value is really 456.192 unit::unit *unit; # pointer to unit # for example "kg" float get_float(); # text get_text(); # for example "456.192 kg" void set_float(float val); # }; # ------------------------------------------------------------------------- # conversion_unit - # ------------------------------------------------------------------------- class conversion_unit { unit::quantity amount; }; # ------------------------------------------------------------------------- # conversion - convert between different units. # ------------------------------------------------------------------------- class conversion { # convert between # different unit::conversion_unit [] units; # units. #unit::quantity convert( unit::quantity source, unit::unit destination); }; }; # $RCSfile: item.gcd,v $: Inventory item definition. # # Copyright (C) 2001 Free Software Foundation, Inc. # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.11 $ $Date: 2001/05/24 14:01:26 $ $Author: ntiffin $ # module inventory # Affected by accounting base/sc reference numbers: 50, 51 { # type replenishment_code_type char<8>; # ------------------------------------------------------------------------- # replenishment - # ------------------------------------------------------------------------- class replenishment { # todo this should move to the demand # planning module # replenishment_code_type code; char code<8>; char desc<15>; ORDER BY code; }; # ------------------------------------------------------------------------- # stock_quantity - # ------------------------------------------------------------------------- class stock_quantity { unit::quantity quantity; # various types of quantities char quantity_type<20>; # on-hand, scrap, on order etc. }; # ------------------------------------------------------------------------- # stock_item - # ------------------------------------------------------------------------- class stock_item : base_item::item { #replenishment_code_type code; char replenishment_code<8>; inventory::stock_quantity [] quantity; # various types of quantities unit::quantity weight; unit::quantity volume; char msds_reference<100>; # material data safety sheet reference text inventory_notes; # inventory handling notes help en code "Stock, non-stock, special order etc."; }; }; # purchasing.gcd # # Copyright (C) 2001 Free Software Foundation, Inc. # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.6 $ $Date: 2001/05/20 23:16:06 $ $Author: ntiffin $ # include "../../../base/units/classes/units.gcd" include "../../../supply-chain/vendor/classes/vendor.gcd" module Purchasing # Affected by accounting base/sc reference numbers: 17, 36, 44, 45 { # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- # EXTEND vendor::vendor class purchasing_vendor : vendor::vendor { text purchasing_notes; help en purchasing_notes "These notes will show up in the purchasing form" "with an option to print on the purchase order."; }; # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- # EXTEND inventory::stock_item class purchasing_item : inventory::stock_item { char buyer_code<8>; text purch_text; char purch_desc<100>; help en buyer_code "The buyer code is a reference to the buyer responsible" "for purchasing this product."; help en purch_text "The purchasing text is text that appears on a line item" "on the purchase order. It would normally be used for" "special notes."; help en purch_desc "The purchasing description replaces the normal item" "description for purchase orders only."; }; # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- class buyer { char employee_id<8>; char buyer_code<8>; }; # ------------------------------------------------------------------------- # this is standard text that can be referenced by id and copied to p.o. # ------------------------------------------------------------------------ class purchasing_text { char id<8>; # is unique for id+buyer char buyer<8>; # buyer code text text; # for keeping standard text that is not by item # normally for various special conditions }; # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- class recommended_vendor { char item_number<25>; char vendor_id<5>; }; # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- class purchase_order_detail { char po_number<5>; int line_number; # the line on the po char item_number<25>; # the item ordered char purch_desc<100>; text purch_text; # for free form notes by item. float price; # should be changed to currency unit::quantity quantity; char units_code<3>; date required_date; }; # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- class purchase_order_header { char po_number<5>; char vendor_id<5>; char payment_terms<25>; char delivery_terms<25>; date date_placed; date date_completed; text po_notes; # free form notes for the total purchase order help en po_notes "These notes will show up in the purchasing form" "with an option to print on the purchase order."; }; }; # shipping.gcd # # Copyright (C) 2001 Free Software Foundation, Inc. # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Id: shipping.gcd,v 1.2 2001/05/05 00:35:09 ntiffin Exp $ # module shipping { class shipping { char dummy<8>; }; }; # warehouse.gcd # # Copyright (C) 2001 Free Software Foundation, Inc. # # This file is part of GNU Enterprise. # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.5 $ $Date: 2001/05/06 22:20:21 $ $Author: ntiffin $ # module warehouse { class storage_location { char part_number<25>; text location_desc; # todo expand this to int floor, row, column, bin int on_hand_qty; int reserve_qty; int un_usable_qty; char location_status<2>; # the status of the location can use, dont use, etc. }; }; # receiving.gcd # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.2 $ $Date: 2001/05/05 00:35:09 $ $Author: ntiffin $ # module receiving { class receiving { char dummy<8>; }; }; # vendor.gcd # # Copyright (C) 2001 Free Software Foundation, Inc. # # # This file originally written by Neil Tiffin (neilt@gnue.org). # # $Revision: 1.13 $ $Date: 2001/05/15 17:18:17 $ $Author: ntiffin $ # include "../../../base/company/classes/company.gcd" module vendor { #type status_code = char<8>; #type type_code = char<8>; # ------------------------------------------------------------------------- # vendor status i.e. approved, dont use, special purchase only # ------------------------------------------------------------------------- class status { #status_code code; char code<8>; char description<25>; INDEX (code); }; # ------------------------------------------------------------------------- # type of vendor. service, raw material, labor. # ------------------------------------------------------------------------- class type { char code<8>; # vendor type char description<25>; INDEX (code); }; # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- class vendor : company::company { text notes; # notes specific to vendors #vendor_status_code code; # Approved, dont use etc. #LOOKUP status : vendor::vendorStatus(code).description = statuscode; #vendor_type_code code; # Service, manufacturer, office supplies etc. #LOOKUP type : vendor::VendorType(code).description = typecode; }; };