Monday 29 July 2013

Is it that Phil lies, or he just cannot count past one?

This page is written in response to the lies that +Phil Daintree has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.

Recently a long term webERP user and advocate wrote to +Phil Daintree saying he should stand down as admin of the project because the way he is running the project is destroying it.

In his reply to that user he says "I have only had to exclude one person".

Not so Phil, I have an email from you where you state that you "excluded" Steve Kaill, one of the earlier webERP developers, as can be seen from the change log, and a long term helper on the mailing list as a search of the archives can demonstrate.

I have an email from Phil where he tells me that he "excluded" Danie Brink. Another one of the early developers of webERP who he decided to force out of the project. Again a search of both the change logs and the mailing list archives will show the amount of his contribution. Amusingly given Phil's recent behaviour one of his complaints against Danie was that Phil claimed he had written some addons to webERP that he had not given back.

I also have three other emails with details of people Phil has "excluded" from the project, who are prepared to be named if he disputes this fact.

Interestingly enough one of the complaints about Phil that "forced" him to exclude these people is his claim to own the copyright of all the code.

So there you have it. Phil added these up and came to the total of one.

So is it that Phil can only count as far as one, or is this yet another of his lies to add to the long history of lies that he has told this project?

Sunday 28 July 2013

Customer Relationship Management

I am starting to code up CRM in @KwaMoja. In the past CRM has largely been ignored in webERP.

For this I have firstly added the ability to have sub areas. So for instance we could have the following setup:

                                             East African Community
                                                                |
                                                                |
                         ________________________|
                         |                         |             
                     Kenya               Uganda           
                         |
   ______________|____________
   |               |              |          |
             Coastal   Central
                   |
           Mombasa

As you can see its now possible to have multilayer sales regions. 

Next I have added the sales area to the sales person record. So now a sales person can be allocated to a particular area. In the above diagram our sales person can be allocated to any of the areas. So they could cover the whole of Kenya, or they could just cover the area of Mombasa.

Also I have added a flag to the sales person record to record whether they are an area manager. Each Area can have only one area manager. 

So it is possible to have a regional manager for Kenya, and also an area manager for each of the regions, Coastal, Central, etc.

This has already been coded and committed to the development code. Now we need to look at configuring the sales cycle.

Saturday 27 July 2013

When censorsip goes mad

This page is written in response to the lies that +Phil Daintree has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.

In a recent discussion on the webERP mailing list +Phil Daintree was writing about the new confirm boxes I did for +KwaMoja . This is the email he wrote:
Tim has also made some improvements to the confirm boxes but probably
unnecessary really, especially since it adds significantly to the size
of the file. 
 I then wrote back:
It only adds 996 bytes to the file, and this could be shortened further with the use of smaller variable names. To my mind they give a more consistent and professional feel across all browsers.
Phil refused to allow this email on the mailing list (for proof of this see previous blog entries), but I posted it to the nabble forums anyway as I thought it might be interesting to people. I then went away and played with this JavaScript a bit more, and managed to reduce the size of this function a bit more, so I posted the following:
Just for interest I reduced this to 921 bytes (0.899Kb) by using shorter variable names.
I tried this to the mailing list, but as usual it was rejected, so I posted it to the nabble forums. To my surprise it got deleted from there. I re-posted it and it got deleted from there again. It has now been deleted seven times by +Phil Daintree or one of his cohorts.

Now can anybody work out why a short post about reducing the size of a JavaScript function to 922 bytes should be considered so offensive that the readers of the nabble forums and the mailing lists need to be protected from reading it?
The only thing that I can imagine is that a recurring theme in his hate pages about me, is how much better a programmer he is than me, and maybe he thinks this email doesn't help that claim. I can't think of another reason.

Philippians 4:8

Amendment 3/1/2014:  I have since been informed  by +Exson Qu and +Phil Daintree that the reasons for deleting the above postings was that commenting on the length of a JavaScript function constituted a personal attack on +Phil Daintree. I have asked for clarification from either +Exson Qu or +Phil Daintree as to why this was, but have received no reply. My best guess is that +Phil Daintree had already said that including the function "adds significantly to the size of the file", and so my pointing out that it was actually quite small was contradicting him and so constituted a personal attack. Personally I think it constitutes valid technical discussion but I include it here as I have always said I am happy to put both sides of the discussion forward and allow readers to make their own minds up.











 

Thursday 25 July 2013

Phil's morals reach new low

This page is written in response to the lies that +Phil Daintree  has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.

It appears that +Phil Daintree has nothing better to do with his time and money than to spend it delving into my private affairs in a desperate attempt to find an example of somewhere I had said something untrue.

This week he sent an email to the webERP mailing list that was faked to appear to come from my email address. This email made some claims about me that were completely untrue. I sent three emails to the list that proved that the accusations were false. Like all my emails to the lists they were rejected. If there is anybody out there who still doesn't believe that my emails are rejected, here is the full rejection including the headers:

Delivered-To: tim.schofield1960@gmail.com Received: by 10.205.22.136 with SMTP id qw8csp104466bkb; Wed, 24 Jul 2013 13:40:56 -0700 (PDT) X-Received: by 10.182.43.230 with SMTP id z6mr31561268obl.82.1374698455868; Wed, 24 Jul 2013 13:40:55 -0700 (PDT) Return-Path: <web-erp-developers-bounces@lists.sourceforge.net> Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id fg9si22656181obc.146.2013.07.24.13.40.55 for <tim.schofield1960@gmail.com> (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 24 Jul 2013 13:40:55 -0700 (PDT) Received-SPF: pass (google.com: domain of web-erp-developers-bounces@lists.MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Request to mailing list Web-erp-developers rejected From: web-erp-developers-bounces@lists.sourceforge.net To: tim.schofield1960@gmail.com Message-ID: <mailman.0.1374698451.16766.web-erp-developers@lists.sourceforge.net> Date: Wed, 24 Jul 2013 20:40:51 +0000 Precedence: bulk X-BeenThere: web-erp-developers@lists.sourceforge.net X-Mailman-Version: 2.1.9 List-Id: webERP Developers <web-erp-developers.lists.sourceforge.net> X-List-Administrivia: yes Errors-To: web-erp-developers-bounces@lists.sourceforge.net Your request to the Web-erp-developers mailing list Posting of your message titled "Re: [WebERP-developers] Testing Tims weberpafrica.com email" has been rejected by the list moderator. The moderator gave the following reason for rejecting your request: "No reason given" Any questions or comments should be directed to the list administrator at: web-erp-developers-owner@lists.sourceforge.net 


Oh, and just in case there is anybody out there who still believe in Phil's lie about me only being moderated on te forums, here is your proof:


Having failed to get my refutation on the mailing list I tried sending them to the nabble forum. Phil then removed my postings to that forum as well. So he is happy to post lies about me to the mailing lists, but removes my refutations. I have known Phil a long time, and suffered greatly from his hate campaign against me, but even I was surprised by just how low he has now sunk.


This isn't new, I am not the first to suffer in this way. Phil forced out many of the earlier developers without whom webERP would never have existed. People such as +Steve Kaill and Danie Brink who did so much of the early work (if you don't believe me just Google their names along with webERP, or simply check out the change log distributed with webERP) were forced out of the project back in 2007.


If this is the way that +Phil Daintree keeps on treating developers then the project will die, new developers wont want to be treated liked this. 

The Lord will judge Phil for his lies and his deceit, but I am sure that the webERP community will judge him for the harm he is doing to our project.

Saturday 20 July 2013

Despicable act

This page is written in response to the lies that +Phil Daintree has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree  will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.

On July 11th we learned that a long standing webERP contributor had died. I had worked a lot with this gentleman, both when I was running the webERP project, and after Phil Daintree's takeover, so I was very saddened to hear this news.

I asked Phil in a private email whether he would allow me to post a small tribute to the webERP developers list. He said "write to the list using your tim@weberpafrica.com address if you would like to" so I did this. As with all my emails to the list this got immediately rejected.

I then wrote my mail to the nabble forum in this post. As can be seen the administrator of the mailing list has still not allowed this post through either.



I think that trying to use the death of a contributor to score points off me in his pathetic vendetta is truly a despicable act.

Amendment  25th July 2013

I am happy to say that +Exson Qu has been kind enough to send my message to the webERP mailing list. My thanks go to Exson for risking incurring one of +Phil Daintrees hate vendettas to do this for me.

Friday 19 July 2013

When egos get in the way of managing the project

This page is written in response to the lies that +Phil Daintree  has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree  is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.

This post to the webERP mailing list shows the sad state affairs that Phil has allowed the management of the webERP project to sink to.

He is trying to copy my code because he wont allow me to directly commit myself, all because I I inserted a link to this blog in my signature on the forum. The fact that he wants my code in webERP is great, and fully within the spirit in which I contribute it to the GPL.

However his ego wont allow him to ask me for help as he doesn't understand how the code works. I would be more than happy to help if he asks.

The GPL states that he should leave the copyright intact, however he claims the ownership of the copyright to the code that he is copying.

In fact he goes further and doesn't even acknowledge in his commit message, or the change log that the code was written by me.

This is the problem when somebody's ego is bigger than the project.It highlights everything that's wrong with the dishonest way that the webERP project is being run.

Monday 8 July 2013

Sorting html tables

I have just committed the code to sort HTML tables. So far this applies to only certain scripts, but to add it to any is easy, and should be done in all by tomorrow.

Here is the result of searching for stock items in SelectProduct.php


Now by clicking at the top of the Description column the table is automatically sorted and shows
and the items are sorted by item description. Clicking on that column again shows:

and the order of the items is reversed. This also holds true for the code column. I have also done the SelectCustomer.php script and the SelectSupplier.php script.

All this is done with one simple JavaScript function and minimal changes to the scripts.

This and the changes committed by Fahad earlier today means a huge leap forward for usability in KwaMoja. Hope you enjoy this new code.

Thursday 4 July 2013

if (isset($_POST['ws'])){ //ws??? wtf???

This page is written in response to the lies that +Phil Daintree  has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.


A strange title I know, but the story behind this is typical of the dishonest and abusive style of leadership that webERP is currently suffering from. 

This comment appeared in Phil Daintree's commit here. Including comments like this in code is inappropriate. If he has a problem with some code he should speak to the author of the code privately and not litter the code with such abusive comments.

What is amusing about this though is that he hadn't bothered to look up who did this code. A simple svn command tells us who did it:

13:37:23 $ svn blame Customers.php | grep 'ws'
   297   daintree                       '. ' . _('If this does not
happen') .' (' . _('if the browser does not support META Refresh') .
') ' .
  6033   daintree if (isset($_POST['ws'])){ //ws??? wtf???
   944   daintree       $ws = $_POST['ws'];
   944   daintree } elseif (isset($_GET['ws'])){
   944   daintree       $ws = $_GET['ws'];
   194   daintree       if (DB_num_rows($result)==0){
  4594   daintree       if (DB_num_rows($result)==0){
   194   daintree       if (DB_num_rows($result)==0){
   194   daintree       if (DB_num_rows($result)==0){
   194   daintree       if (DB_num_rows($result)==0){
   944   daintree                       echo '<tr class="OddTableRows">';
   944   daintree                       echo '<tr class="EvenTableRows">';


As can be seen, it turns out the author of the code is somebody called daintree!  Once I pointed this out to him, instead of his normal trick of ridiculing the authors work, he silently removed the comment here.

If it hadn't been Phil who had authored the code, what would have happened? In 2010 a developer called Marcos Trejo with the help of Pak Ricard developed an excellent module for printing labels, which has since been used by many businesses.

However, Phil didn't like this code. Instead of speaking to Ricard and Marcos privately about this code, and how it can be improved, he started to constantly ridicule the code on the mailing list. Almost daily we would wake up to yet more personal attacks on this contribution. This is not the way to encourage new developers. It is no wonder that Marcos didn't contribute any more code.

All contributors should be treated equally. All contributors should retain the copyright to their own work. Double standards should not be applied.

Tuesday 25 June 2013

Lot's of great new functionality

KwaMoja has just gained lots of new functionality.

We now have a maintenance module for fixed assets. This allows you to set specific maintenance tasks for individual fixed assets, set up a schedule for these tasks to be done, and to email the person responsible with reminders when the tasks are becoming due.

Electronic bank statements in the MT940 format can now be imported and analysed directly into the KwaMoja general ledger.

Many thanks must go to Phil Daintree for this excellent contribution.

Phil has also setup a demo mode, which will stop whoever it is with an IP address in Wellington, New Zealand that has too much time on their hands and too little to occupy themselves. This person keeps trying to come up with new ways to wreck our demo. Thanks Phil for helping to stop them.

Also KwaMoja now links to Phil's new web shop, and it can be administered directly through KwaMoja. This web shop is commercial software, and not open source, so it is hard for us to test and verify, so caution  needs to be observed on the security side of this as it stores information about your customers payment methods. Nevertheless a great contribution, thanks Phil.

We now also have the ability to import general ledger journals, payments, and receipts directly from a csv file.

Also there is now a flag setting in the user setup that can restrict a user to only access their default location. Thanks Jerry for sponsoring this work.

All this new functionality can be tried out at the KwaMoja demo.




Friday 21 June 2013

Re-writing history

This page is written in response to the lies that +Phil Daintree has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.

Phil Daintree has started editing and deleting posts of mine on the nabble forums in order to show a version of history that he wants people to believe rather than the reality.

This is typical of the dishonest way that the webERP project is currently being run.

I will re-instate my posts, but it is guaranteed that he will just repeat his actions, and remove the real posts, and just insert his own as mine.

Meanwhile users should be aware that the views that seem to come from me are not necessarily mine, and should be treated with caution.

I also urge others who post to the nabble forums to carefully check any posts they have made, to ensure that theirs have also not been changed by Phil.

Friday 7 June 2013

The dishonesty of sending private emails to third parties libeling somebody.

This page is written in response to the lies that +Phil Daintree has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.


It seems that Phil Daintree's latest ploy is to send people private emails about me, thus hoping that I will be unable to give that person my version of the events. Several people have sent me copies of these emails so I have been able to point out the facts to them, however this doesn't get away from the basic dishonesty of these actions.

It's important to note that Phil does not dispute any of the facts about him that I have put in this blog, what he is against is that I should be able to write it at all, and that he is unable to block it.

One of the things Phil repeatedly says about me is that I am unable to admit when I am wrong. So just for fun I spent 5 minutes searching the nabble archives. There are dozens of examples of my apologising for being wrong of which the following is a small sample, but the reader can find there own by searching here.

http://weberp-accounting.1478800.n4.nabble.com/Purchase-Orders-entry-td1482135.html#a1482137

http://weberp-accounting.1478800.n4.nabble.com/Release-3-10-4-td1483601.html#a1483603

http://weberp-accounting.1478800.n4.nabble.com/Re-Stock-php-refresh-problem-td1487424.html#a1487424

http://weberp-accounting.1478800.n4.nabble.com/Care2x-webERP-integration-td1487567.html#a1487570

http://weberp-accounting.1478800.n4.nabble.com/webERP-translation-Translations-td1490158.html#a1490160

http://weberp-accounting.1478800.n4.nabble.com/PrintCheque-php-error-td1488350.html#a1488356

http://weberp-accounting.1478800.n4.nabble.com/Issue-with-PO-header-php-Version-3-11-rc2-td1484089.html#a1484092

http://weberp-accounting.1478800.n4.nabble.com/Error-on-stock-adj-td1483826.html#a1483827

http://weberp-accounting.1478800.n4.nabble.com/SVN-gurus-td1489462i20.html#a1489486


When Phil says I cannot admit to being wrong, what he actually means is that I wont say he is right when he is clearly wrong. In an email to several major contributors of webERP he told us that once he has expressed his opinion on a matter then the subject should be closed and no more discussion will be allowed. This is unacceptable in an open source project, whatever messianic delusions the administrator may have

Wednesday 5 June 2013

How to keep a stable KwaMoja/webERP installation updated

There has been a lot of discussion recently on the webERP forums about how to keep a stable version of your implementation, so I thought it might be a good moment to write an article on how to do this.

Firstly Web ERP Africa Ltd keeps a stable branch of the webERP code. This takes the last release (4.10.1 at the moment I write this) and then just adds in any bug fixes that have been applied to the main line. Obviously this does not include any bug fix to any new functionality, as that functionality does not exist in the stable branch. We also apply our regression tests to these fixes, to ensure that they are not re-introducing any previous bugs. This branch should then get progressively more stable, but anybody  who wants the latest features can use the main trunk. I have made this stable branch publicly available from my github repository and can be found here. You can download a zip file containing this code from here. This zip file is automatically updated when a new bug fix is applied.

Exactly the same is true for KwaMoja, it's stable branch can be found by using the master branch here.

So if you are using a KwaMoja/webERP that has no customisations in it then all you have to do, is to keep an eye on this repository, and download new versions as and when it is updated.

However there are potential problems when you have customised scripts in your installation. I will assume that if the user has the knowledge to change the files then they will have a small knowledge of IT, and you will need the application Git installed.
 
What we wish is to avoid the code being over written when updating from the stable branch. I have created a small git repository here to represent the stable branch, and have uploaded the following script to it, calling it HelloWorld.php:

<?php
include('includes/session.inc');
$Title = _('Hello World');
include('includes/header.inc');
echo '<p class="page_title_text noPrint" ><img src="'.$RootPath.'/css/'.$Theme.'/images/user.png" width="24px" title="' . _('Hello World') . '" alt="" />' . _('Hello World') . '</p>';
if (isset($_POST['Submit'])) {
    /* Get clients IP address */
    $IPAddress = $_SERVER['REMOTE_ADDR'];

    /* Has user been here before? */
    $SQL = "SELECT count(name) as names
                FROM helloworld
                WHERE name='" . $_POST['Name'] . "'
                    AND ipaddress='" . $IPAddress . "'";
    $Result = DB_query($SQL, $db);
    $MyRow = DB_fetch_array($Result);
    if ($MyRow['names'] > 0) {
        prnMsg( _('Welcome back') . ' ' . $_POST['Name'], 'info');
    } else {
        $SQL = "INSERT INTO helloworld (ipaddress,
                                        name)
                                    VALUES (
                                        '" . $IPAddress . "',
                                        '" . $_POST['Name'] . "'
                                    )";
        $Result = DB_query($SQL, $db);
        prnMsg( _('Hi') . ' ' . $_POST['Name'], 'info');
    }
} else {
    echo '<div class="page_help_text noPrint">' . _('Enter your name in the box below.') . '</div>';
    echo '<form enctype="multipart/form-data" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" class="noPrint">';
    echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
    echo '<div class="centre">
            <input type="text" name="Name" />
        </div>
        <div class="centre">
            <input type="submit" name="Submit" value="Submit" />
        </div>';
    echo '</form>';
}
include('includes/footer.inc');

?>

Now you can pull this code to your own machine by issuing the command:

git clone git@github.com:timschofield/Example1.git

Now we make a local change to our code. We will change the word 'Hi' to 'Hello'. Now if we wish to update our code to the latest from the repository we would issue the command:

git pull git@github.com:timschofield/Example1.git

and this will update any changes - if there were any new bug fixes applied for instance. However you will notice that Git is smart enough not to try and overwrite your code that you changed locally.

So by using Git we can update our code to the latest stable branch, whilst keeping our local changes in place.

Monday 27 May 2013

ABC inventory ranking system is completed

As detailed in this blog post we have been working on a system for ranking inventory items by the standard ABC classification system.

I am happy to announce that this new system has just been uploaded to the KwaMoja repositories and those who wish to try it can download our development snapshot from here.

The only change from the original blog post was a suggestion from Francis that we use a consumption value system as our default ranking method rather than the proposed sales value method - thanks Francis.

The next step in warehouse management system is to setup the warehouse storage definitions as outlined in the excellent document prepared by Buz and Mary Beth (sorry I don't know more details of these people) that can be downloaded from here. Then we are into the cycle count code.

This code was offered to Phil Daintree at webERP but appears to have been rejected.

Wednesday 22 May 2013

New Work Order Entry script

I have never liked the old method of entering work orders in webERP and now I am no longer allowed to help people on the mailing lists and forums I have more time to devote to correcting it.

The old script didn't follow the normal webERP conventions, for instance it allocated a work order number, as soon as user clicked on that menu option, even if they didn't go on to enter an order, and this meant tracking order numbers was impossible. Sales and purchase orders both use a class to hold the order details in but Work orders didn't. The code was messy, and didn't abide by the coding guidelines.

In fact I am surprised it was ever allowed to corrupt the code base. I have just uploaded a revised script, which has more functionality, but in a lot less code. "Do more with less" is a good motto for these types of things.

Unfortunately I am not allowed to push this new functionality to the webERP svn repository, so you need to get it from here https://github.com/timschofield/KwaMoja/archive/develop.zip if you wish to test it. Hopefully someone who is still allowed to commit to svn will push it to webERP.

Any issues or bugs please let me know.




Monday 20 May 2013

Phil Daintree and his "hate pages"

This page is written in response to the lies that +Phil Daintree has written about me, and spread on the internet. Despite years of searching he has been unable to find anything I have written that is untrue, and he has had to resort to vague generalities, faked emails, and badly fabricated screenshots (you can see the joins if you zoom in using any bit mapped image editor). +Phil Daintree is welcome to make any comments to these pages, as he has done in the past. If I agree with what he says I will amend my writings, if I do not agree I have allowed his comments to stand next to mine so that people can make their own judgements. I have every confidence in the intelligence of readers to make a sensible judgement based on the facts. +Phil Daintree will not allow me the right of reply to any of the lies he has told about me. It seems to me significant that he realises that if people see both sides of the argument they will see through his lies.


Writing "Hate Pages" about fellow developers and then denying them the right to reply has always been Phil Daintree's weapon of choice when trying to bully developers out of the project. Back on 11 September 2007 when Phil was trying to bully most of the early webERP developers out of the project, he wrote to me telling me he had written one of his hate pages about them and was going to publish it on weberp.org. 

At the time I dissuaded him from this action. He again brought the subject on the following day, and again I had to dissuade him. Unfortunately when he came to writing his "hate page" about me there was nobody left to dissuade him.

These are used to force developers to leave quietly, as Phil maintains personal control over the mailing lists, the forums, the wiki and the web site, meaning that it is not possible to dispute any of the lies he writes within the project. What really annoys him about me is that I refuse to be intimidated off the project.

I received many warnings about this behaviour when I was first getting deeply involved in the project. Unfortunately I really didn't believe them. Obviously I should have, and have since apologised to those whose warnings I ignored.

Only by taking the stand I have can I hope to save current and future developers being treated in this way.

Tuesday 14 May 2013

ABC analysis of stock items.

One of the most important methods of keeping accurate stock levels - though by no means the most widely used, especially in Africa - is cyclical stock checking. That is the constant checking of the stock throughout a financial period, rather than leaving stock checks to the period end.

This has two big advantages in the control of an organisations stock. Firstly the stock levels are kept in a much more accurate state as they are checked more frequently, and secondly any variances are far easier to track down if the period between checking the item is much shorter.

A necessary prerequisite of cyclical stock checking is an ABC analysis of the organisations stock. By ABC analysis I mean to rank the items by:

A - The most important items to the organisation
B - Important to the organisation but not critical
C - Slow moving or non important stock items.

At the moment we have no ABC analysis. This is a proposal to rectify that.

ABC classification is a way of grouping your stock items. There are a few different ways to set up an ABC Ranking, such as Velocity (times sold), Quantity sold/Consumed or by Margin. But the most common method is the Annual Sales Volume ranking. This method will allow you to identify the small number of items that usually account for most of your sales value (think 80/20 rule).

My plan is to first implement Annual Sales Volume Ranking method, but to do it in such a way as to make adding other methods easy in the future. To do this I propose to setup a table to hold the methods to be used. This table will have the following structure:

CREATE TABLE `abcmethods` (
     `methodid` TINYINT NOT NULL DEFAULT 0,
     `methodname` VARCHAR(40) NOT NULL DEFAULT '',
     PRIMARY KEY (`methodid`)
);

Initially this will have just one record in, 
methodid=>0 
methodname=>Annual Sales Volume Ranking

The next table will contain the groups that are being used. This will specify the criteria used. Each method can have several groups. I propose the following table:

CREATE TABLE `abcgroups`(
     `groupid` INT(11) NOT NULL DEFAULT 0,
     `groupname` VARCHAR(40) NOT NULL DEFAULT '',
     `methodid` TINYINT NOT NULL DEFAULT 0,
     `apercentage` TINYINT NOT NULL DEFAULT 0,
     `bpercentage` TINYINT NOT NULL DEFAULT 0,
     `cpercentage` TINYINT NOT NULL DEFAULT 0,
     `zerousage` CHAR(1) NOT NULL DEFAULT 'D',
     `months` TINYINT NOT NULL DEFAULT 12,
     PRIMARY KEY (`groupid`),
     CONSTRAINT `abcgroups_ibfk_1` FOREIGN KEY (`methodid`) REFERENCES `abcmethods` (`methodid`) 
);

The zerousage field is intended to hold the category into which items that have no usage at all should be put. This would normally be C or D. The months field is the number of prior months movements that should be analysed.
Finally I propose a separate table to hold the ABC category for each item and group. This would look like:

CREATE TABLE `abcstock` (
     `groupid` INT(11) NOT NULL DEFAULT 0,
     `stockid` VARCHAR(20) NOT NULL DEFAULT '',
     `abccategory` CHAR(1) NOT NULL DEFAULT 'C',
     PRIMARY KEY (`groupid`, `stockid`), 
     CONSTRAINT `abcstock_ibfk_1` FOREIGN KEY (`groupid`) REFERENCES `abcgroups` (`groupid`),
     CONSTRAINT `abcstock_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) 
);   

Using these three tables should provide for a very flexible system, easily changed in the future.

The function to actually assign the categories would work something like this:


1.  Calculate the 12 month value usage for all of the stock items.
2.  Rank the items in descending order by value.
3.  The "A" items are the top 80%.
4.  The "B" items make up the next 15%.
5The "C" items are the remaining items that have any usage in the period being looked at.
6.  Label zero-usage items as "D".


Comments and constructive (yes Phil I am looking at you!) criticisms would be very much appreciated.







Wednesday 8 May 2013

The anatomy of a KwaMoja plugin

As promised in my previous post regarding KwaMoja plugins, here is a tutorial on constructing a plugin.

Each plugin is a zip file. For this tutorial we will use the demo plugin that is available from http://www.kwamoja.com/demo_plugin.zip.

This demo takes the form of a standard "Hello World" type application, as used in most programming tutorials. The plugin will present the user with a text box asking for the users name. If that user has not used the plugin before from that IP address they will get a message saying "Hello John" or "Hello Jane" or whatever his or her name is. If they are returning, they will get a welcome back message.

If you unzip this file you will see it contains 5 files:

HelloWorld.php
HelloWorldDB.php
HelloWorldDBRemoval.php
HelloWorldLinks.txt
summary.xml

ALL KwaMoja plugins must have a summary.xml file. This is the file that tells KwaMoja how to install the plugin. Here is the xml contained in this examples summary.xml:

<plugin>
    <name>Demo Plugin</name>
    <installed>0</installed>
    <license>gpl</license>
    <scripts>
        <script>
            <name>HelloWorld.php</name>
            <pagesecurity>1</pagesecurity>
        </script>
    </scripts>
    <menulinks>HelloWorldLinks.txt</menulinks>
    <dbupdates>HelloWorldDB.php</dbupdates>
    <dbremoval>HelloWorldDBRemoval.php</dbremoval>
</plugin>


The first attribute is a descriptive name for the plugin. I have just called this one "Demo Plugin" .

The next attribute shows whether the plugin has been installed. KwaMoja will automatically set this to 1 when the plugin is installed. This should be set to zero when writing the plugin, and then never manually changed.

Then there follows the name of the license that this plugin is covered by. In this case, the GPL.

Next is an array of scripts that will be installed and a security token for each script. HelloWorld.php is a KwaMoja script. The plugin can contain any number of these scripts. In this simple example we only need the one, and I have given it a security token of one meaning any user can use it. I will go through this script and how to write a KwaMoja script in my next post.

The next attribute is called "menulinks" and contains the name of the file containing details of what new menu items are required to be added, and if any new modules are to be added to the menus. The full contents of this file for our example are:

$ModuleLink[] = 'Test';
$ReportList['Test'] = 'test';
$ModuleList[] = 'Test';

$MenuItems['Test']['Transactions']['Caption'][] = 'Hello World';
$MenuItems['Test']['Transactions']['URL'][] = '/HelloWorld.php';


The first three items on the list will setup a new module called "Test" to appear on the main menu. This is not obligatory. For instance if your plugin fits best in the Manufacturing module, then there is no need to have these lines. The next two lines are necessary for every script that you want the user to have access too via the main menu. These take the form of $MenuItems[Module][Section][Caption] and $MenuItems[Module][Section][URL] where "Module" is the name of the module, either one that you have just created or from the following list:

'orders', 

'AR', 
'AP', 
'PO', 
'stock', 
'manuf',  
'GL', 
'FA', 
'PC', 
'system', 
'Utilities'

The section is either "Transactions", "Reports", or "Maintenance" and determines whether the item appears in the left, centre, or right section of the menu. The Caption is the string that will appear in the menu, and the URL is the path to that menu, which must include a "/" at the beginning, as in "/HelloWorld.php".

Penultimately there is an attribute called dbupdates. This provides a link to a file containing the following:

<?php
CreateTable('helloworld',
"CREATE TABLE helloworld (
ipaddress char(13),
name varchar(30),
PRIMARY KEY  (`ipaddress`, `name`)
)", $db);

$SQL = "UPDATE www_users SET modulesallowed=modulesallowed+'1, WHERE userid='" . $_SESSION['UserID'] . "'";
executeSQL($SQL, $db);
?>


These are commands used to make any necessary changes to the database for your plugin to work. If it doesn't need any changes there should still be a file that just contains the <?php ?> tags in it. KwaMoja comes with an api to allow you to access the database, and facilitates the use of different DBMS's. You can find the functions here. The first call is to the CreateTable() function. Secondly there is some sql to update the users modulesallowed field and finally there is a call to the executeSQL() function to run this SQL.


The final attribute in the summary.xml file is called dbremoval. This is a reference to the file that contains the commands required to remove the database changes when the user uninstalls the plugin. Our demo file contains the following:

<?php
DropTable('helloworld', 'name', $db);

$SQL = "SELECT modulesallowed FROM www_users WHERE userid='" . $_SESSION['UserID'] . "'";
$Result = DB_query($SQL, $db);
$MyRow = DB_fetch_array($Result);

$SQL = "UPDATE www_users SET modulesallowed='" . substr($MyRow['modulesallowed'], 0, strlen($MyRow['modulesallowed'])-2) . "' WHERE userid='" . $_SESSION['UserID'] . "'";
executeSQL($SQL, $db);

?>
As you can see above, both the dbupdates and the dbremoval files can contain php code to verify information before updating the database.




So that is a simple KwaMoja plugin. This zip file can be imported into KwaMoja, and you can see and use this plugin directly from the menu.
The next post will cover actually writing the script.