commit-gnue
[Top][All Lists]
Advanced

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

r6554 - in trunk/gnue-packages: base finance


From: reinhard
Subject: r6554 - in trunk/gnue-packages: base finance
Date: Sat, 23 Oct 2004 13:19:26 -0500 (CDT)

Author: reinhard
Date: 2004-10-23 13:19:25 -0500 (Sat, 23 Oct 2004)
New Revision: 6554

Removed:
   trunk/gnue-packages/base/base-C.gld
   trunk/gnue-packages/base/base-de.gld
   trunk/gnue-packages/base/base.gcd
   trunk/gnue-packages/base/currcalc.gfd
   trunk/gnue-packages/finance/gl.gcd
Log:
Removed the files here that have moved to gnue-luca.


Deleted: trunk/gnue-packages/base/base-C.gld
===================================================================
--- trunk/gnue-packages/base/base-C.gld 2004-10-23 14:37:44 UTC (rev 6553)
+++ trunk/gnue-packages/base/base-C.gld 2004-10-23 18:19:25 UTC (rev 6554)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Base Module - Standard labels
-
-     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$ -->
-
-<module name="base" language="C">
-  <class name="currency">
-    <property name="code"      pos="100" label="Code"   search="100" />
-    <property name="symbol"    pos="200" label="Symbol" search="200" />
-    <property name="name"      pos="300" label="Name"   search="300" />
-    <property name="roundunit" pos="500" label="Rounding Unit" />
-    <property name="convbase"  pos="600" label="Conversion amount in base 
currency" />
-    <property name="convthis"  pos="601" label="Conversion amount in this 
currency" />
-  </class>
-</module>

Deleted: trunk/gnue-packages/base/base-de.gld
===================================================================
--- trunk/gnue-packages/base/base-de.gld        2004-10-23 14:37:44 UTC (rev 
6553)
+++ trunk/gnue-packages/base/base-de.gld        2004-10-23 18:19:25 UTC (rev 
6554)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!-- Base Module - German labels
-
-     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$ -->
-
-<module name="base" language="de">
-  <class name="currency">
-    <property name="code"      pos="100" label="Code"   search="100" />
-    <property name="symbol"    pos="200" label="Symbol" search="200" />
-    <property name="name"      pos="300" label="Name"   search="300" />
-    <property name="roundunit" pos="500" label="Rundungseinheit" />
-    <property name="convbase"  pos="600" label="Konvertierungsbetrag 
Basisw�hrung" />
-    <property name="convthis"  pos="601" label="Konvertierungsbetrag diese 
W�hrung" />
-  </class>
-</module>

Deleted: trunk/gnue-packages/base/base.gcd
===================================================================
--- trunk/gnue-packages/base/base.gcd   2004-10-23 14:37:44 UTC (rev 6553)
+++ trunk/gnue-packages/base/base.gcd   2004-10-23 18:19:25 UTC (rev 6554)
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Base Module
-
-     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$ -->
-
-<module name="base" comment="Basic classes">
-  <class name="currency" comment="Currency">
-    <!-- For the base currency, code is None -->
-    <property name="code"      type="string(8)" />
-    <property name="symbol"    type="string(8)" />
-    <property name="name"      type="string(35)" />
-    <property name="roundunit" type="number(14,2)" />
-    <!-- Conversion factors to base currency -->
-    <!-- Example: convbase = 100, convthis = 1376.03 means 100 units of base
-         currency are 1376.03 units of this currency -->
-    <property name="convbase"  type="number(14,2)" />
-    <property name="convthis"  type="number(14,2)" />
-
-    <procedure name="round" type="number(14,2)">
-      <parameter name="amount" type="number(14,2)" />
-      <![CDATA[
-        # Round given amount
-        ru = self.roundunit or 0.01
-        if amount < 0:
-          x = amount - ru / 2
-        else:
-          x = amount + ru / 2
-        return int (x / ru) * ru
-      ]]>
-    </procedure>
-
-    <procedure name="convfrom" type="number(14,2)">
-      <parameter name="amount" type="number(14,2)" />
-      <![CDATA[
-        # Convert amount given in this currency to base currency
-        cb = self.convbase or 1
-        ct = self.convthis or 1
-        # baselist = find ('currency', {'code': None})
-        # if length (base) == 1:
-        #   for base in baselist:
-        #     break
-        #   return base.round (amount * cb / ct)
-        # else:
-          # Emergency - Base currency not defined
-        return self.round (amount = amount * cb / ct)
-      ]]>
-    </procedure>
-
-    <procedure name="convto" type="number(14,2)">
-      <parameter name="amount" type="number(14,2)" />
-      <![CDATA[
-        # Convert amount given in base currency to this currency
-        cb = self.convbase or 1
-        ct = self.convthis or 1
-        return self.round (amount = amount * ct / cb)
-      ]]>
-    </procedure>
-  </class>
-</module>

Deleted: trunk/gnue-packages/base/currcalc.gfd
===================================================================
--- trunk/gnue-packages/base/currcalc.gfd       2004-10-23 14:37:44 UTC (rev 
6553)
+++ trunk/gnue-packages/base/currcalc.gfd       2004-10-23 18:19:25 UTC (rev 
6554)
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="iso8859-1"?>
-
-<form title="GNUe Currency Calculator">
-  <datasource
-    name="dtsFromCurrency"
-    connection="appserver"
-    table="base_currency"
-    prequery="Y" />
-  <datasource
-    name="dtsToCurrency"
-    connection="appserver"
-    table="base_currency"
-    prequery="Y" />
-  <logic>
-    <block name="blk">
-      <field name="fldFromSymbol" fk_source="dtsFromCurrency" fk_key="gnue_id"
-        fk_description="base_symbol" />
-      <field name="fldFromAmount" />
-      <field name="fldToSymbol" fk_source="dtsToCurrency" fk_key="gnue_id"
-        fk_description="base_symbol" />
-      <field name="fldToAmount" />
-    </block>
-    <block name="blkFromCurrency" datasource="dtsFromCurrency" />
-    <block name="blkToCurrency" datasource="dtsToCurrency" />
-  </logic>
-  <layout xmlns:Char="GNUe:Layout:Char" Char:height="4" Char:width="37">
-    <page name="page">
-      <entry name="entFromSymbol"
-        Char:height="1" Char:width="8" Char:x="1" Char:y="1"
-        block="blk" field="fldFromSymbol" style="dropdown" />
-      <entry name="entFromAmount"
-        Char:height="1" Char:width="8" Char:x="9" Char:y="1"
-        block="blk" field="fldFromAmount" />
-      <label text="="
-        Char:height="1" Char:width="1" Char:x="18" Char:y="1" />
-      <entry name="entToSymbol"
-        Char:height="1" Char:width="8" Char:x="20" Char:y="1"
-        block="blk" field="fldToSymbol" style="dropdown" />
-      <entry name="entToAmount"
-        Char:height="1" Char:width="8" Char:x="28" Char:y="1"
-        block="blk" field="fldToAmount"/>
-      <button name="Calculate"
-        Char:height="1" Char:width="35" Char:x="1" Char:y="3"
-        label="Calculate">
-        <trigger name="trigger" type="ON-ACTION">
-          # FIXME: should not have to manually navigate to current record...
-          dtsFromCurrency.createResultSet ({'gnue_id': 
blk.fldFromSymbol.get()})
-          dtsToCurrency.createResultSet ({'gnue_id': blk.fldToSymbol.get ()})
-
-          f = int (blk.fldFromAmount.get ())
-          b = dtsFromCurrency.call ('base_convfrom', {'amount': f})
-          t = dtsToCurrency.call ('base_convto', {'amount': b})
-          blk.fldToAmount.set (t)
-        </trigger>
-      </button>
-    </page>
-  </layout>
-</form>

Deleted: trunk/gnue-packages/finance/gl.gcd
===================================================================
--- trunk/gnue-packages/finance/gl.gcd  2004-10-23 14:37:44 UTC (rev 6553)
+++ trunk/gnue-packages/finance/gl.gcd  2004-10-23 18:19:25 UTC (rev 6554)
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- General Ledger Module
-
-     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$ -->
-
-<module name="gl" comment="General Ledger">
-  <class name="year" comment="Fiscal year">
-    <property name="name"     type="string(17)" nullable="False" />
-    <property name="start"    type="date"       nullable="False" />
-    <property name="end"      type="date"       nullable="False" />
-    <property name="previous" type="gl_year"    />
-    <property name="active"   type="boolean"    nullable="False" />
-    <property name="last"     type="number(6)"  comment="Last journal serial" 
/>
-    <procedure name="OnChange">
-      <![CDATA[
-        # TODO: self.start and self.end may not be changed if there are already
-        #       some journals in this year (?)
-        # TODO: if self.active is set to False, set all periods to inactive,
-        #       too
-      ]]>
-    </procedure>
-    <procedure name="OnValidate">
-      <![CDATA[
-        # TODO: check: self.start must be the first day of a month
-        # TODO: check: self.last must be the last day of a month
-        # TODO: check: self.end > self.start
-        # TODO: check: self.previous.end + 1day = self.start
-        # TODO: generate accounting periods
-      ]]>
-    </procedure>
-  </class>
-
-  <class name="period" comment="Accouning period">
-    <property name="year"   type="gl_year"    nullable="False" />
-    <property name="name"   type="string(17)" nullable="False" />
-    <property name="start"  type="date"       nullable="False" />
-    <property name="end"    type="date"       nullable="False" />
-    <property name="active" type="boolean"    nullable="False" />
-    <procedure name="OnChange">
-      <![CDATA[
-        # TODO: self.start and self.end may not be changed if there are already
-        #       some journals in this period (?)
-      ]]>
-    </procedure>
-    <procedure name="OnValidate">
-      <![CDATA[
-        # TODO: self.end must be the last day of the same month of which
-        #       self.start is the first day.
-        # TODO: self.start and self.end must be within self.year.start and
-        #       self.year.end
-        # TODO: may not be active if year is inactive
-      ]]>
-    </procedure>
-  </class>
-
-  <class name="account" comment="General Ledger Account">
-    <property name="year"     type="gl_year"       nullable="False" />
-    <property name="number"   type="string(17)"    nullable="False" />
-    <property name="name"     type="string(35)"    />
-    <property name="active"   type="boolean"       nullable="False" />
-    <property name="currency" type="base_currency" nullable="False" />
-    <procedure name="OnChange">
-      <![CDATA[
-        # TODO: number may not be changed if account was already used
-      ]]>
-    </procedure>
-  </class>
-
-  <class name="doctype" comment="Document type">
-    <property name="code"    type="string(8)"  nullable="False" />
-    <property name="name"    type="string(35)" />
-    <!-- This account will be used automatically, e.g. bank account -->
-    <!-- Problem: the accounts are per year, this class is general... -->
-    <!-- Maybe have this class per year, too? -->
-    <property name="account" type="gl_account" />
-  </class>
-
-  <class name="journal" comment="General Ledger Journal">
-    <property name="period"   type="gl_period" nullable="False" />
-    <property name="serial"   type="number(6)" nullable="False" />
-    <property name="last"     type="number(6)" comment="Last transact serial" 
/>
-    <property name="balanced" type="boolean"   nullable="False">
-      <![CDATA[
-        # Find out whether the journal is balanced
-        for trans in find ('trans', conditions = {'journal': self}):
-          if not trans.balanced:
-            return False
-        return True
-      ]]>
-    </property>
-    <property name="posted"   type="date"      />
-    <procedure name="post">
-      <![CDATA[
-        # Post the journal, which means it will not be changeable any more
-        import mx.DateTime
-        if not self.balanced:
-          # TODO: How do we handle exceptions???
-          raise "Journal is not balanced"
-        self.posted = mx.DateTime.now () # Should probably be a parameter
-      ]]>
-    </procedure>
-    <procedure name="OnValidate">
-      <![CDATA[
-        if not self.period.active:
-          raise "Accounting period is inactive"
-        if not self.serial:
-          self.period.year.last += 1
-          self.serial = self.period.year.last
-        self.last = 0
-      ]]>
-    </procedure>
-  </class>
-
-  <class name="trans" comment="General Ledger Transaction">
-    <property name="journal"  type="gl_journal"    nullable="False" />
-    <property name="serial"   type="number(6)"     comment="Pos. in journal" />
-    <property name="source"   type="gl_doctype"    comment="Document type" />
-    <property name="number"   type="string(17)"    comment="Document number" />
-    <property name="date"     type="date"          comment="Document date" />
-    <property name="currency" type="base_currency" nullable="False" />
-    <property name="last"     type="number(6)"     comment="Last entry serial" 
/>
-    <property name="balanced" type="boolean"       nullable="False">
-      <![CDATA[
-        # Find out whether the transaction is balanced
-        sum = 0
-        for entry in find ('entry', conditions = {'trans': self},
-                                    properties = ['credit', 'amountt']):
-          if entry.credit:
-            sum -= entry.amountt
-          else:
-            sum += entry.amountt
-        return (sum == 0)
-      ]]>
-    </property>
-    <procedure name="OnValidate">
-      <![CDATA[
-        # Find out whether the transaction can be entered
-        if self.journal.posted:
-          raise "Journal is already posted"
-        if not self.serial:
-          self.journal.last += 1
-          self.serial = self.journal.last
-        self.last = 0
-      ]]>
-    </procedure>
-  </class>
-
-  <class name="entry" comment="General Ledger Entry">
-    <property name="trans"   type="gl_trans"     nullable="False" />
-    <property name="serial"  type="number(6)"    comment="Pos. in transaction" 
/>
-    <property name="account" type="gl_account"   nullable="False" />
-    <property name="credit"  type="boolean"      nullable="False" />
-    <property name="amountt" type="number(14,2)" comment="in transact 
currency" />
-    <property name="amounta" type="number(14,2)" comment="in account currency" 
/>
-    <property name="amountb" type="number(14,2)" comment="in base currency" />
-    <property name="comment" type="string(70)"   />
-    <procedure name="OnValidate">
-      <![CDATA[
-        # Find out whether the entry is valid
-        if not self.account.active
-          raise "Account is inactive"
-        # TODO: calculate amounta and amountb
-        self.amounta = self.amountt
-        self.amountb = self.amountt
-        if not self.serial:
-          self.trans.last += 1
-          self.serial = self.trans.last
-      ]]>
-    </procedure>
-  </class>
-</module>





reply via email to

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