<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Direct Invoice flow]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=1297</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1297&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Direct Invoice flow.]]></description>
		<lastBuildDate>Tue, 11 May 2010 13:14:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5872#p5872</link>
			<description><![CDATA[<p>Jesus, you are really hardcore developer - five hundred lines of bash (working!) code. Its definitely out of my skills scope, but fortunately php scripts can be run from command line <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" />... </p><p>You have to install CLI version of PHP, and you can start. Cron can run any command line program, also php interpreter.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Tue, 11 May 2010 13:14:23 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5872#p5872</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5865#p5865</link>
			<description><![CDATA[<p>OK, first off, I have to agree with Janusz. It&#039;s not really the way to go by accessing the database directly, especially if I have to redo all the work every time a major new upgrade comes out.</p><p>We have used a variety of windows/unix/web accounting programs over the last 14 years and frontaccounting is by far the best we have used for our purposes. I keep thinking that gnue will go somewhere, but it been 14 years and counting since I started following that. Whatever we do, it has to work with frontaccounting.</p><p>Here is what we are trying to do...</p><p>We are running two business under 1 set of books. We have two DBA names because the businesses are so different and unrelated (Bookbinding and Wireless High Speed Internet).</p><p>Frontaccounting is set up under the Bookbinding business because that is the main one. The Wireless is a side effort but uses a different name because, lets face it, who would by Internet access from a old book guy :-)</p><p>Anyway, we have the bandwidth and threshold usage stored in an autogenerated rrd database. We also have a list of customers stored in a mysql database with what services they get billed for very month.</p><p>What I wanted was a script that would access the autobill information from mysql, then access the rrd database and determine if any additional bandwidth should be billed to the customer, generate an email invoice/statement combination and then insert the invoice information into frontaccounting as if I had manually inserted a direct invoice. This script would run just after midnight on the first of every month.</p><p>I wrote a first pass prototype of the script in bash (what an ugly kludge of a script!) It&#039;s 500 lines of database calls, and string manipulation. It was relatively easy to figure out what frontaccounting was doing by looking at the log, but I really would hate to do that again. If nothing else, the process was very informative of what frontaccounting was doing. (rather more complicated than some of the other accounting programs have been)</p><p>I wouldn&#039;t even bother posting the kludge. It&#039;s obviously not the way to go.</p><p>I&#039;ve never really done much php scripting, but I guess now is as good a time as any. Can you run a php script from a cron job?</p>]]></description>
			<author><![CDATA[null@example.com (ephraim)]]></author>
			<pubDate>Tue, 11 May 2010 00:03:57 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5865#p5865</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5828#p5828</link>
			<description><![CDATA[<p>I am no coder... but I think... SymmetricDS would do the update FA data base that you need?&nbsp; SymmetricDS is web-enabled, database independent, data synchronization/replication software. It uses web and database technologies to replicate tables between relational databases in near real time. The software was designed to scale for a large number of databases, work across low-bandwidth connections, and withstand periods of network outage.</p><p>By using database triggers, SymmetricDS guarantees that data changes are captured and atomicity is preserved. Support for database vendors is provided through a Database Dialect layer, with implementations for MySQL, Oracle, SQL Server, PostgreSQL, DB2, Firebird, HSQLDB, H2, and Apache Derby included.</p><p>For a POS I think this is the way to go...</p><p>AM</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Fri, 07 May 2010 02:33:33 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5828#p5828</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5826#p5826</link>
			<description><![CDATA[<p>Ok, no problem. We are anyway busy with other matters currently.<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Thu, 06 May 2010 16:01:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5826#p5826</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5824#p5824</link>
			<description><![CDATA[<p>Janusz,</p><p>Sorry it is taking me a while to get back to you on my thoughts.<br />We are working on it and we have 3 programmers hired full time that are working on our system with Frontaccounting at the center of things.</p><p>We are almost done with our POS system and when it is finished and ready to work with Front Accounting, I will let you know.</p><p>Thanks for your patience, I will be in touch as soon as I have something ready to show you.<br />My last comment was mainly just to point out that until there are custom fields and workflows in frontaccounting, that our POS integration is mainly happening through vtiger&#039;s custom workflows and custom fields interacting directly with the frontaccounting database.</p><p>Thanks,</p><p>Dave</p>]]></description>
			<author><![CDATA[null@example.com (bruzergear)]]></author>
			<pubDate>Thu, 06 May 2010 14:10:30 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5824#p5824</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5820#p5820</link>
			<description><![CDATA[<p>One of such a way is using cart class methods as Joe explained. Depending on target system you can include/call cart class directly using some thin php wrapper or implement external API (soap/xplrpc/hessian) to FA internal model functions.</p><p>Regarding custom fields/workflows you know my point of view, but seems that for some reason you are not really determined to turn this idea into reality as <a href="https://frontaccounting.com/punbb/viewtopic.php?pid=5473#p5473">before</a> <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" />.<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Thu, 06 May 2010 08:27:46 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5820#p5820</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5810#p5810</link>
			<description><![CDATA[<p>Janusz,</p><p>I agree that this is not the best way to integrate systems, but until front accounting has the ability to create custom fields and custom workflows in a similar fashion as vtiger, we don&#039;t see any other way of getting the type of integration we need.</p>]]></description>
			<author><![CDATA[null@example.com (bruzergear)]]></author>
			<pubDate>Wed, 05 May 2010 21:14:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5810#p5810</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5809#p5809</link>
			<description><![CDATA[<p>Hi guys,</p><p>It&#039;s a pity to say your code dealing directly with FA database content will not work with next FA major release (within month or so). This is _really_ not right way of integration unless you want to do the same work every couple of months on new releases,&nbsp; or you prefer using current FA version forever.</p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Wed, 05 May 2010 20:08:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5809#p5809</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5804#p5804</link>
			<description><![CDATA[<p>Ephraim,</p><p>We would love it if you shared your Insert and Update queries with us when you are done so we don&#039;t have to repeat what you have already done.<br />We also need to go directly to the database and want to make sure we are inserting and updating everything correctly.</p><p>Thanks,<br />Dave</p>]]></description>
			<author><![CDATA[null@example.com (bruzergear)]]></author>
			<pubDate>Wed, 05 May 2010 15:47:35 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5804#p5804</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5802#p5802</link>
			<description><![CDATA[<p>having looked at the cart_class.php file, it looks pretty simple. If I was doing something from php, that&#039;s certainly the way I would go.</p><p>However, the program I have to integrate is not php. what I have to do is write a glue script that will move data from it (stored in an rrd database and a MySQL database) to the frontaccounting database and make it look like I created a direct invoice from within frontaccounting.</p><p>It turns out the easiest way to see what was going on was to log the MySQL calls that frontaccounting made during the generation of a direct invoice. By manipulating the log it&#039;s pretty clear what is happening. There are lots of SELECT queries (which I expected to find) and three distinct transactions. One for the order, one for the delivery and one for the invoice. You really only have to pay attention to the UPDATE and INSERT statements to clearly understand it.</p><p>Given this information, I think I can write that glue script to run under a cron job. I still have a bit more digging to do before I try though. Frontaccounting uses a quite a few numerical symbols (such as &quot;type&quot; for transaction, etc..) that I need to get a handle on.</p>]]></description>
			<author><![CDATA[null@example.com (ephraim)]]></author>
			<pubDate>Wed, 05 May 2010 14:35:51 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5802#p5802</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5789#p5789</link>
			<description><![CDATA[<p>I would recommend using the class cart, in /sales/includes/cart_class.inc, explained by Janusz.</p><p>Simply include this file and create an object of this class. And then fill this object with your invoice details and item lines. You can see ,in /sales/sales_order_entry.php, how to fill the items and invoice details and finally how to save the object with the write method.<br />This way you are using the internal core of FA to get everything updated, including (invoice, debtor trans, delivery, sales order, GL transactions etc.). So by studying this file, you will see how to do it.</p><p>This is much better than trying to explain how everything is connected in DB.<br />If you are curious about this, however, there is an ER-diagram and Table scheme for download on the download documentation page.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 04 May 2010 09:41:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5789#p5789</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5784#p5784</link>
			<description><![CDATA[<p>We also would like a detailed account of all the database tables and fields that have data inserted into or updated when a direct invoice is submitted.<br />It will help us better integrate other systems with front accounting.</p><p>Thanks,<br />Dave</p>]]></description>
			<author><![CDATA[null@example.com (bruzergear)]]></author>
			<pubDate>Tue, 04 May 2010 05:56:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5784#p5784</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5782#p5782</link>
			<description><![CDATA[<p>I also would like this information for use in a POS module.&nbsp; If someone takes the time to do this please post it...:)</p><p>Thanks</p><p>Alvin</p>]]></description>
			<author><![CDATA[null@example.com (alvin)]]></author>
			<pubDate>Tue, 04 May 2010 03:33:49 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5782#p5782</guid>
		</item>
		<item>
			<title><![CDATA[Re: Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5779#p5779</link>
			<description><![CDATA[<p>Generally during direct invoice 3 transactions are generated: sales order, sales delivery and an invoice.Unfortunately there is no detailed documentation about this, but you can find all the changes in db by investigating all the calls done in write method of class cart (file sales/includes/cart_class.inc). </p><p>Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Mon, 03 May 2010 11:23:18 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5779#p5779</guid>
		</item>
		<item>
			<title><![CDATA[Direct Invoice flow]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=5769#p5769</link>
			<description><![CDATA[<p>I was wondering if anyone could inform me of the flow of the database access and updating when making a direct invoice (sans payment)</p><p>I want to integrate a separate program that will auto-generate invoices based on some dynamic information contained in another database, then insert the appropriate data in frontaccounting as if frontaccounting had done it itself.</p><p>I hav no problme with database manipulation, but cannot find documentation on what tables are changed in frontaccounting with a direct invoice.</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (ephraim)]]></author>
			<pubDate>Sat, 01 May 2010 18:13:13 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=5769#p5769</guid>
		</item>
	</channel>
</rss>
