commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r13 - trunk/finance


From: reinhard
Subject: r13 - trunk/finance
Date: Fri, 5 Nov 2004 17:40:41 -0600 (CST)

Author: reinhard
Date: 2004-11-05 17:40:40 -0600 (Fri, 05 Nov 2004)
New Revision: 13

Added:
   trunk/finance/acc-main.gfd
Modified:
   trunk/finance/gl.gcd
Log:
First steps on a main accounting entry form.


Added: trunk/finance/acc-main.gfd
===================================================================
--- trunk/finance/acc-main.gfd  2004-11-05 23:08:21 UTC (rev 12)
+++ trunk/finance/acc-main.gfd  2004-11-05 23:40:40 UTC (rev 13)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Accounting main entry form
+
+     Copyright 2004 Free Software Foundation
+
+     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 of
+     the License, 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.
+
+     $Id: base.gcd 6208 2004-08-25 16:49:04Z reinhard $ -->
+
+<form title="GNUe Accounting">
+  <datasource
+    name="dtsDoctype"
+    connection="appserver"
+    table="gl_doctype"
+    prequery="Y" />
+
+  <datasource
+    name="dtsPeriod"
+    connection="appserver"
+    table="gl_period"
+    prequery="Y" />
+
+  <datasource name="dtsJournal" connection="appserver" table="gl_journal"
+    master="dtsPeriod" masterlink="gnue_id" detaillink="gl_period">
+    <condition>
+      <null><cfield name="gl_posted" /></null>
+    </condition>
+  </datasource>
+
+  <datasource name="dtsTrans" connection="appserver" table="gl_trans"
+    order_by="gl_serial"
+    master="dtsJournal" masterlink="gnue_id" detaillink="gl_journal" />
+
+  <datasource name="dtsEntry" connection="appserver" table="gl_entry"
+    order_by="gl_serial"
+    master="dtsTrans" masterlink="gnue_id" detaillink="gl_trans" />
+
+  <logic>
+    <block name="blk">
+      <field name="fldPeriod" fk_source="dtsPeriod" fk_key="gnue_id"
+        fk_description="gl_name">
+        <trigger type="POST-CHANGE">
+          <![CDATA[
+            # FIXME: This should not be necessary.
+            dtsPeriod.createResultSet ({'gnue_id': blk.fldPeriod.get()})
+          ]]>
+        </trigger>
+      </field>
+    </block>
+
+    <block name="blkPeriod" datasource="dtsPeriod" />
+
+    <block name="blkJournal" datasource="dtsJournal">
+      <field name="fldSerial" field="gl_serial" />
+    </block>
+
+    <block name="blkTrans" datasource="dtsTrans">
+      <field name="fldDoctype" fk_source="dtsDoctype" fk_key="gnue_id"
+        fk_description="gl_code" />
+      <field name="fldNumber" field="gl_number" typecast="number" />
+      <field name="fldDate" field="gl_date" typecast="date" />
+    </block>
+
+    <block name="blkEntry" datasource="dtsEntry" />
+  </logic>
+
+  <layout xmlns:Char="GNUe:Layout:Char" Char:height="20" Char:width="80">
+    <page name="page">
+      <label text="Period:"
+        Char:height="1" Char:width="7" Char:x="1" Char:y="1" />
+      <entry name="entPeriod"
+        Char:height="1" Char:width="17" Char:x="10" Char:y="1"
+        block="blk" field="fldPeriod" style="dropdown" />
+      <label text="Journal:"
+        Char:height="1" Char:width="8" Char:x="29" Char:y="1" />
+      <entry name="entJournal"
+        Char:height="1" Char:width="17" Char:x="38" Char:y="1"
+        block="blkJournal" field="fldSerial" style="label" />
+
+      <label text="Document:"
+        Char:height="1" Char:width="9" Char:x="1" Char:y="3" />
+      <entry name="entDoctype"
+        Char:height="1" Char:width="8" Char:x="10" Char:y="3"
+        block="blkTrans" field="fldDoctype" style="dropdown" />
+      <entry name="entNumber"
+        Char:height="1" Char:width="17" Char:x="19" Char:y="3"
+        block="blkTrans" field="fldNumber" />
+      <label text="Date:"
+        Char:height="1" Char:width="5" Char:x="37" Char:y="3" />
+      <entry name="entDate"
+        Char:height="1" Char:width="10" Char:x="43" Char:y="3"
+        block="blkTrans" field="fldDate" displaymask="%x" inputmask="%x"/>
+    </page>
+  </layout>
+</form>

Modified: trunk/finance/gl.gcd
===================================================================
--- trunk/finance/gl.gcd        2004-11-05 23:08:21 UTC (rev 12)
+++ trunk/finance/gl.gcd        2004-11-05 23:40:40 UTC (rev 13)
@@ -158,6 +158,11 @@
         return (sum == 0)
       ]]>
     </property>
+    <procedure name="OnInit">
+      <![CDATA[
+        self.currency = self.gl_year.base_company.base_currency
+      ]]>
+    </procedure>
     <procedure name="OnValidate">
       <![CDATA[
         # Find out whether the transaction can be entered





reply via email to

[Prev in Thread] Current Thread [Next in Thread]