prepare print@home
authorKonrad Rosenbaum <konrad@silmor.de>
Tue, 2 Aug 2016 06:37:31 +0000 (08:37 +0200)
committerKonrad Rosenbaum <konrad@silmor.de>
Tue, 2 Aug 2016 06:37:31 +0000 (08:37 +0200)
wob/db/db.wolf
wob/db/event.wolf
wob/db/order.wolf
wob/magicsmoke.wolf
wob/transact/order.wolf

index 5cb8958..6cd70be 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- Main MagicSmoke DB Definition WOLF
   -
-  - (c) Konrad Rosenbaum, 2009-2015
+  - (c) Konrad Rosenbaum, 2009-2016
   - this file is protected under the GNU AGPLv3 or at your option any newer
   - see COPYING.AGPL for details
   -->
@@ -9,7 +9,7 @@
        <DataBase
                instance="db" schema="dbScheme" defaultUpdating="yes"
                configTable="config" configKeyColumn="ckey" configValueColumn="cval"
-               version="01.06" versionRow="MagicSmokeVersion">
+               version="01.07" versionRow="MagicSmokeVersion">
                <AuditTables>
                        <Column name="audittime" type="int64">Time at which the change was made.
                                <Call lang="php" method="time()"/>
index 3a6226f..0e5fb72 100644 (file)
@@ -2,7 +2,7 @@
 <!-- Event Definition MagicSmoke WOLF
   - declares everything needed to define events
   -
-  - (c) Konrad Rosenbaum, 2009-2012
+  - (c) Konrad Rosenbaum, 2009-2016
   - this file is protected under the GNU AGPLv3 or at your option any newer
   - see COPYING.AGPL for details
   -->
index 9d7e576..d07e5df 100644 (file)
@@ -2,7 +2,7 @@
 <!-- Order MagicSmoke WOLF
   - Tables and Comm Objects for Orders, Tickets, Vouchers, etc.
   -
-  - (c) Konrad Rosenbaum, 2009-2012
+  - (c) Konrad Rosenbaum, 2009-2016
   - this file is protected under the GNU AGPLv3 or at your option any newer
   - see COPYING.AGPL for details
   -->
                additional tags for this item, can be used by scripts
                </Column>
        </Table>
+
+       <Table name="orderdocuments" backup="yes" audit="no" backupkey="orderid">
+               <Doc>Documents that refer to a specific order. E.g. invoices, Print@Home tickets, etc.</Doc>
+               <Column name="fileid" type="seq64" primarykey="yes"/>
+               <Column name="orderid" type="int32" foreignkey="order:orderid" notnull="yes"/>
+               <Column name="filename" type="string" notnull="yes"/>
+               <Column name="mtime" type="int64" notnull="yes">The time when the file was last modified.</Column>
+               <Column name="content" type="blob"/>
+               <Unique>orderid,filename</Unique>
+       </Table>
 </Wolf>
index fe6adb4..cb70db4 100644 (file)
@@ -17,7 +17,7 @@
        <Include file="db/db.wolf"/>
        
        <!-- configure output -->
-       <QtClientOutput sourceDir="iface" subDir="wob" priInclude="wob.pri" classPrefix="M" clean="yes" transactionBase="MTransaction" scriptable="yes" enableExport="yes"/>
+       <QtClientOutput sourceDir="iface" subDir="wob" priInclude="wob.pri" classPrefix="M" clean="yes" transactionBase="MTransaction" enableExport="yes"/>
        <PHPServerOutput sourceDir="www" subDir="inc/wob" extension=".php" clean="yes" transactionBase="MSmokeTransaction"/>
        <HtmlOutput sourceDir="doc" subDir="wob" clean="yes"/>
        <!-- SchemaOutput sourceDir="wob" filename="test.xsd" compound="cmp.xsd"/ -->
index a55af24..52dff6d 100644 (file)
                <Call lang="php" method="WOOrder::deletePayTypeTransaction($this);"/>
                <Output/>
        </Transaction>
+
+       <Transaction name="GetOrderDocumentNames" update="no">
+               <Doc>Gets the names of all files associated with the Order</Doc>
+               <Input>
+                       <Var name="orderid" type="int"/>
+               </Input>
+               <Call lang="php" method="WOOrder::getOrderDocuments($this);"/>
+               <Output>
+                       <Var name="filename" type="List:string"/>
+               </Output>
+       </Transaction>
+       <Transaction name="GetOrderDocument" update="no">
+               <Doc>Gets a document associated with an order.</Doc>
+               <Input>
+                       <Var name="orderid" type="int"/>
+                       <Var name="filename" type="string"/>
+               </Input>
+               <Call lang="php" method="WOOrder::getOrderDocument($this);"/>
+               <Output>
+                       <Var name="content" type="blob"/>
+               </Output>
+       </Transaction>
+       <Transaction name="SetOrderDocument" update="yes">
+               <Doc>Stores a document associated with an order. Overwrites the document if it already exists, creates it otherwise.</Doc>
+               <Input>
+                       <Var name="orderid" type="int"/>
+                       <Var name="filename" type="string"/>
+                       <Var name="content" type="blob"/>
+               </Input>
+               <Call lang="php" method="WOOrder::getOrderDocument($this);"/>
+               <Output/>
+       </Transaction>
+       <Transaction name="DeleteOrderDocument" update="yes">
+               <Doc>Deletes a document associated with an order. Produces an error if the document does not exist.</Doc>
+               <Input>
+                       <Var name="orderid" type="int"/>
+                       <Var name="filename" type="string"/>
+               </Input>
+               <Call lang="php" method="WOOrder::getOrderDocument($this);"/>
+               <Output/>
+       </Transaction>
+
+       <Transaction name="SendCustomerMail" update="no">
+               <Doc>Sends an eMail to a customer. Usually to update the customer about Order data.</Doc>
+               <Input>
+                       <Var name="customerid" type="int">ID of the customer. Must be given! The mail address associated with the account is used.</Var>
+                       <Var name="cc" type="List:string">Additional Cc addresses - usually extracted from the customer contact information.</Var>
+                       <Var name="content" type="blob">Content of the eMail.</Var>
+               </Input>
+               <Call lang="php" method=";"/><!-- TODO -->
+               <Output/>
+       </Transaction>
 </Wolf>