Operand Type Gotcha

The Balance History from Date form previously had a bug in the case where a credit balance in the running balance column then gets a further credit added to it. The result is that the credit balance behaves as if … Continue reading

Posted in Esoterica | Comments Off on Operand Type Gotcha

Mapped drives

All too often we find that Windows Datacentre admins configure Datacentre to use "mapped drive" paths for Backups (or even for the Documents root). In the latter case, they soon find out that it doesn't work. In the former, they … Continue reading

Posted in Esoterica, Servers | Comments Off on Mapped drives

Relational Find for arbitrary link fields

When you do a relational find for anything that does not have a link that shows up in the Find Related dialog box, then you must explicitly provide the link fields. A good example of this is when finding Ledger … Continue reading

Posted in Database, Esoterica | Comments Off on Relational Find for arbitrary link fields

Accessing REST from PHP

Example of using curl to issue an authenticated REST request. <?php     // Demonstrates two methods of including authorisation     //      for accessing a resource     // The resource in this case is an xml export of the account     //      table of document Acme.moneyworks     if($_GET["auth"] == "headers")  {         $ch = curl_init();         // set URL and other appropriate options         curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:6710/REST/Acme.moneyworks/                                         export/table=account&format=xml-terse");         curl_setopt($ch, CURLOPT_HEADER, 0);         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);         // set Auth headers for Datacentre login, and document login         $headers = array(             "Authorization: Basic " . base64_encode("root:Datacentre:XXXX"),             "Authorization: Basic " . base64_encode("Admin:Document:fred"));         curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);          $result = curl_exec($ch);         curl_close($ch);         }     else if($_GET["auth"] == "inline")  {         $ch = curl_init();         // usernames and passwords are inline in the URL         // ask for verbose output so we can see the difference         curl_setopt($ch, CURLOPT_URL, "http://root:XXXX@127.0.0.1:6710/                                       REST/Admin:fred@Acme.mwd6/export/                                       table=account&format=xml-verbose");         curl_setopt($ch, CURLOPT_HEADER, 0);         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);         $result = curl_exec($ch); … Continue reading

Posted in REST | Comments Off on Accessing REST from PHP

Downwards compatibility of documents

Now that all products use the same document type, it is perhaps less obvious when a document is not openable in Express after you have been making changes in Gold (because you no longer need to do a down-save which … Continue reading

Posted in Database, Esoterica | Comments Off on Downwards compatibility of documents

Silent installation

Our Windows installers (based on NSIS) have a "silent" mode that allows them to run from the command line without user interaction. This is enabled with the command switch /S. You can type, for example: "Install MoneyWorks Gold.exe" /S This … Continue reading

Posted in Esoterica | Comments Off on Silent installation

Optimised searching

Sometimes you need to do a search that involves a fast component and a very slow component. Maybe something like this detail.parentseq = transaction.sequencenumber and testflags(detail.flags, #0008) The problem with this search expression is that it defeats the search optimiser … Continue reading

Posted in Esoterica | 1 Comment

Adding and removing Transaction images via script

Although it is obvious that you can create transaction images yourself in the Pictures/Transactions folder (see also The Pictures Folder), MoneyWorks won't "see" the picture unless the fHasScan flag (= 0x00100000) is set in the flags field of the transaction. … Continue reading

Posted in Database, Esoterica | Comments Off on Adding and removing Transaction images via script

Reports as Scripts

By popular request (actually just multiple requests from Grant), from v6.0.6, you can run reports from the Command menu by placing them in the Scripts folder. The "No Dialog" report settings option—which used to completely suppress the report settings dialog … Continue reading

Posted in Esoterica, Reporting | Comments Off on Reports as Scripts

The Pictures folder

MoneyWorks currently stores 2 types of images. Transaction images and product images. These go in a subfolder of Custom Plugins called "Pictures for NAME", where NAME is the company name from the company details dialog box. If you change the … Continue reading

Posted in Esoterica | Comments Off on The Pictures folder