Billing with Lx-Office

Lx-Office is a ledger application. It is a fork of the ledger application sql-ledger. It is optimized for German businesses. Little is know about its suitability for non-Germand businesses.

A short summary of how GNUmed could interact with Lx-Office:

1.) Via submit button or menu item new invoice GNUmed could check in the lx- office database whether or not a client exists and if not create it via command line in the background.

2.) I could then start a browser such as Firefox and send you to the page inside lx-office where you can create and invoice. Lx-office will let you save that as a draft and let you recall it to add items. How much of this can be automated is yet to be seen.

3.) Via submit button or menu item produce invoice it will take you to the draft page and let you book the invoice, effectively booking it to an account and giving you the option to print a pdf of it.

4.) Another button or menu item could send you to the list of open invoices and whatnot for either that patient or all patients. this can either be done inside lx-office in the browser or one could write a plugin for that which is not recommended as it would replicate the UI without giving any obvious benefit. For die hards the lx-office database can be queried directly.

5.) A fifth item would take you to lx-office to mark it as paid once you have received compensation.


livehttpheaders.mozdev.org has a Firefox addon which lets you see the http header as it would appear in the browser.

A short help with examples is here (German only I am afraid) http://wiki.lx-office.org/index.php?title=Allgemeine_Developer_FAQ#Q:_Wie_kann_ich_Lx_Routinen_auf_der_Konsole_starten.3F


This leads to these examples:

search for customer (e.g. name Müller, id 4)

debian:/usr/lib/lx-office-erp# ./ct.pl "path=./bin/mozilla&action=search&level=Master%2520Data--Reports--Customers&db=customer&db=customer&customernumber=4&name=Müller&contact=&email=&cp_name=&addr_street=&addr_zipcode=&addr_city=&business_id=&status=all&obsolete=N&l_customernumber=Y&l_name=Y&l_street=Y&l_zipcode=Y&l_city=Y&nextsub=list_names&action=Weiter&login=tux&password=linux"

The result of this is a html page which indicates that there are no matches, one or many matching records. There is an option to export this to cvs which could make parsing easier. If there is more then one match I suppose GNUmed could just start Firefox with the corresponding URL. If no matches are available a new customer can be created on the command line.

new customer with hardcoded id (e.g. 4)

debian:/usr/lib/lx-office-erp# ./ct.pl "path=./bin/mozilla&action=add&level=Master%2520Data--
Add%2520Customer&db=customer&customernumber=4&greeting=Herr&selected_company_greeting=&name=Evik+Kneevel&department_1=&department_2=&street=Russenstr.
+52&zipcode=04289&city=Leipzig&country=Deutschland&contact=&phone=&fax=&email=&homepage=&creditlimit=0&terms=&payment_id=&discount=0&taxnumber=&ustid=&c_vendor_id=&account_number=&bank_code=&bank=&iban=&bic=&business=&language_id=&klass=&taxzone_id=0&salesman_id=&notes=&shipto_id=0&shiptoname=&shiptodepartment_1=&shiptodepartment_2=&shiptostreet=&shiptozipcode=&shiptocity=&shiptocountry=&shiptocontact=&shiptophone=&shiptofax=&shiptoemail=&cp_id=&cp_id=0&cp_gender=m&cp_title=&selected_cp_title=&cp_abteilung=&selected_cp_abteilung=&cp_givenname=&cp_name=&cp_phone1=&cp_phone2=&cp_fax=&cp_mobile1=&cp_mobile2=&cp_satphone=&cp_satfax=&cp_project=&cp_email=&cp_privatphone=&cp_privatemail=&cp_birthday=&bcc=&delivery_id=0&from=&to=&NOTE_id=&FU_id=&NOTE_subject=&NOTE_body=&FU_date=&FU_created_for_user=861&id=&business_save=&title_save=Kunde+erfassen&callback=ct.pl%3Faction%3Dadd%26db%3Dcustomer&db=customer&action=Speichern&&login=tux&password=linux"

new customer with autogenerated id

This version will autogenerate (generated by lx-office) a customer id and will pipe the resulting html to a file. This file can then be parsed to feed the customer id back to GNUmed for reference.

tux@debian:~$ ./ct.pl "path=./bin/mozilla&action=add&level=Master%2520Data--Add%2520Customer&db=customer&customernumber&greeting=Herr&selected_company_greeting=&name=Evil+Kneevelautoid&department_1=&department_2=&street=Russenstr.+52&zipcode=04289&city=Leipzig&country=Deutschland&business_save=&title_save=Kunde+erfassen&callback=ct.pl%3Faction%3Dadd%26db%3Dcustomer&db=customer&action=Speichern&login=tux&password=linux" >/home/tux/new_customer.html

GNUmed could then open Firefox with either a page to select the correct customer

firefox "https://lx-office.linet-services.de/official-demo/ct.pl?action=search&level=Master%2520Data--Reports--Customers&db=customer&db=customer&customernumber=4&name=M&contact=&email=&cp_name=&addr_street=&addr_zipcode=&addr_city=&business_id=&status=all&obsolete=N&l_customernumber=Y&l_name=Y&l_street=Y&l_zipcode=Y&l_city=Y&nextsub=list_names&action=Weiter"

or a page to create a new invoice inside the browser

firefox "https://lx-office.linet-services.de/official-demo/is.pl?action=add&level=AR--Add%2520Sales%2520Invoice&type=invoice"


new invoice in database via command line

debian:/usr/lib/lx-office-erp# ./is.pl 
"path=./bin/mozilla&id=1&action=print&type=invoice&media=queue&format=pdf&queued=&printed=&emailed=&title=Rechnung+bearbeiten&vc=customer&discount=&title=Rechnung+bearbeiten&creditlimit=0.00000&creditremaining=-17.85&tradediscount=&business=&closedto=&locked=&shipped=&storno=0&storno_id=&max_dunning_level=&dunning_amount=&shiptoname=&shiptostreet=&shiptozipcode=&shiptocity=&shiptocountry=&shiptocontact=&shiptophone=&shiptofax=&shiptoemail=&shiptodepartment_1=&shiptodepartment_2=&message=&email=&subject=&cc=&bcc=&taxaccounts=1776+&cursor_fokus=&convert_from_do_ids=&convert_from_oe_ids=&customer_id=901&oldcustomer=Evik+Kneevel--901&selectcustomer=1&forex=1&exchangerate=1&1776_rate=0.19000&1776_description=Umsatzsteuer&1776_taxnumber=1776&follow_up_trans_id_1=1&follow_up_trans_type_1=sales_invoice&follow_up_trans_info_1=EK03-2706%2F2010+%28Evik+Kneevel%29&follow_up_rowcount=1&lizenzen=1&customer=Evik+Kneevel--901&customer_klass=0&customer_id=901&oldcustomer=Evik+Kneevel--901&selectcustomer=1&AR=1400--
Ford.+a.Lieferungen+und+Leistungen&selectAR=%3Coption+selected%3E1400--Ford.
+a.Lieferungen+und+Leistungen%3C%2Foption%3E%0D%0A%3Coption%3E1445--
Ford.a.LuL+z.allg.USt-Satz+o.eines+Kleinuntern.
%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1446--Ford.aLuL+z.erm.USt.-
Satz+%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1447--
Ford.a.steuerfr.od.nicht+steuerb.LuL+%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1448--
Ford.a.LuL+n.Durchschnittss.gem.
%C2%A724UStG%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1450--
Ford.a.LuL+n.Durchschnittss.gem.
%C2%A724UStG%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1400--Ford.
+a.Lieferungen+und+Leistungen%3C%2Foption%3E%0D%0A%3Coption%3E1445--
Ford.a.LuL+z.allg.USt-Satz+o.eines+Kleinuntern.
%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1446--Ford.aLuL+z.erm.USt.-
Satz+%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1447--
Ford.a.steuerfr.od.nicht+steuerb.LuL+%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1448--
Ford.a.LuL+n.Durchschnittss.gem.
%C2%A724UStG%28E%C3%9CR%29%3C%2Foption%3E%0D%0A%3Coption%3E1450--
Ford.a.LuL+n.Durchschnittss.gem.
%C2%A724UStG%28E%C3%9CR%29%3C%2Foption%3E%0D%0A&taxzone_id=0&department_id=&fxgain_accno=&fxloss_accno=&shippingpoint=&shipvia=&transaction_description=&employee_id=861&salesman_id=861&invnumber=EK02-2606%2F2010&invdate=06.06.2010&duedate=06.06.2010&donumber=&deliverydate=&ordnumber=&orddate=&quonumber=&quodate=&cusordnumber=&globalproject_id=&webdav=0&runningnumber_1=1&partnumber_1=3&description_1=Gesundheitszeugnis+ausf%C3%BChrlich+neu&qty_1=1%2C00&price_factor_id_1=&unit_1=Stck&sellprice_1=15%2C00&sellprice_pg_1=--
&discount_1=0&unit_old_1=Stck&price_new_1=0&orderitems_id_1=&bo_1=&pricegroup_old_1=&price_old_1=0&id_1=907&inventory_accno_1=&bin_1=&partsgroup_1=&partnotes_1=&income_accno_1=8400&expense_accno_1=3400&listprice_1=15%2C00000&assembly_1=0&taxaccounts_1=1776&ordnumber_1=&transdate_1=&cusordnumber_1=&longdescription_1=&basefactor_1=1&marge_absolut_1=0%2C00&marge_percent_1=0%2C00&marge_price_factor_1=&lastcost_1=15&serialnumber_1=&project_id_1=&reqdate_1=&runningnumber_2=2&partnumber_2=&description_2=&qty_2=0%2C00&price_factor_id_2=&unit_2=kg&sellprice_2=0%2C00&discount_2=0&unit_old_2=&price_new_2=0&orderitems_id_2=&bo_2=&pricegroup_old_2=&price_old_2=0&id_2=&inventory_accno_2=&bin_2=&partsgroup_2=&partnotes_2=&income_accno_2=&expense_accno_2=&listprice_2=&assembly_2=&taxaccounts_2=&ordnumber_2=&transdate_2=&cusordnumber_2=&longdescription_2=&basefactor_2=&marge_absolut_2=0%2C00&marge_percent_2=0%2C00&marge_price_factor_2=&lastcost_2=0&serialnumber_2=&project_id_2=&reqdate_2=&notes=&intnotes=&payment_id=&marge_total=0&marge_percent=0&datepaid_1=&source_1=&memo_1=&paid_1=&AR_paid_1=1000--
Kasse&paidaccounts=1&selectAR_paid=%3Coption%3E1000--
Kasse%3C%2Foption%3E%0D%0A%3Coption%3E1200--
Bank%3C%2Foption%3E%0D%0A%3Coption%3E8731--
Gew%C3%A4hrte+Skonti+7%25+USt%3C%2Foption%3E%0D%0A%3Coption%3E8735--
Gew%C3%A4hrte+Skonti+16%25%2F19%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8750--
Gew%C3%A4hrte+Boni+7%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8760--
Gew%C3%A4hrte+Boni+16%25%2F19%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8780--
Gew%C3%A4hrte+Rabatte+7%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8790--
Gew%C3%A4hrte+Rabatte+16%25%2F19%25+Ust.
%3C%2Foption%3E%0D%0A%3Coption%3E1000--
Kasse%3C%2Foption%3E%0D%0A%3Coption%3E1200--
Bank%3C%2Foption%3E%0D%0A%3Coption%3E8731--
Gew%C3%A4hrte+Skonti+7%25+USt%3C%2Foption%3E%0D%0A%3Coption%3E8735--
Gew%C3%A4hrte+Skonti+16%25%2F19%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8750--
Gew%C3%A4hrte+Boni+7%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8760--
Gew%C3%A4hrte+Boni+16%25%2F19%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8780--
Gew%C3%A4hrte+Rabatte+7%25+USt.%3C%2Foption%3E%0D%0A%3Coption%3E8790--
Gew%C3%A4hrte+Rabatte+16%25%2F19%25+Ust.
%3C%2Foption%3E%0D%0A&oldinvtotal=15&oldtotalpaid=0&formname=invoice&language_id=&format=pdf&media=screen&rowcount=2&callback=is.pl%3Faction%3Dadd%26type%3Dinvoice&draft_id=&draft_description=&customer_discount=0&gldate=06.06.2010&login=tux&password=linux">/home/tux/invoice.pdf

new invoice by customer_id via browser (see notes below)

https://lx-office.linet-services.de/official-demo/is.pl?action=add&level=AR--Add%2520Sales%2520Invoice&type=invoice&login=demo&password=demo&customer_id=901

see all open invoices

firefox "https://lx-office.linet-services.de/official-demo/rp.pl?action=report&level=General%2520Ledger--Reports--AR%2520Aging&report=ar_aging
&title=Offene+Forderungen&department=&customer=&fromdate=&todate=&type=statement&format=html&media=screen&nextsub=generate_ar_aging&action=generate_ar_aging&action=Weiter"


notes

For preselecting the customer in the customer in the invoice form one needs the pk for the customer. If you have it you can select the customer by passing 'customer_id=pk' in the URL
Topic revision: 08 Jun 2010, SebastianHilbert
 
Download.png
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Powered by Olark