Philip Sheard has been working in IT for over 40 years, and on this project for the last 20. His current skills include Java, Android, Objective-C, iOS, PHP, MySQL, ASP.Net, SQL Server, HTML, CSS, Apache and WordPress.
One of the features that distinguishes the Sales Manager from its competitors is its ability to handle large amounts of data. It can easily cope with 50,000 customers or products, with almost no loss of performance. To achieve this, the mobile app is heavily optimised, and provides a rich set of features to search such large datasets.
The lists involved are:
The customer list.
The product list.
The list of lines that can be added to an order.
The main difference between the customer and product lists is that the latter can be divided into categories. The lines behave in a similar way, but have additional properties. This chapter will focus primarily on the product list, but the others behave in a similar manner.
The name of the category is used as the title of the screen, and tapping on it displays a list of categories to choose from. This is a standard Android paradigm.
The list can be sorted either by id or by name. When a list is opened, it is always sorted by name, but this can be changed by tapping on the Sort button in the action bar. Changing the sort order also changes the field that gets searched. If the list is ordered by name, that is the field that gets searched, and vice versa.
To search a list:
Tap the Search icon (magnifying glass) in the action bar. The action bar is filled with an input field, and the input panel (soft keyboard) pops up.
Enter the target text to search for, and tap the back button, to dismiss the input panel. The list will now be restricted to the items whose names (or ids) contain the target text. If a category has been selected, only the items in that category will be displayed. An example is shown in the screenshot on the right.
Tap the back button, to end the search and return the list to its normal state.
Note that the search is case insensitive – upper and lower case characters are treated in exactly the same way. Note also that only the key field is searched. It is not possible to search for text in any other field. This is done by design, in order to speed up the search process.
One of the design objectives of the mobile app is that all screens should be viewable in both horizontal mode and vertical mode. This is especially useful for the iOS app, where fields do not adjust automatically to accommodate their content. Note that rotating a screen actually restarts its activity – something that you might not want to do when downloading a large table.
A number of screens use horizontal swiping (both left-to-right and right-to-left) to move between the records in a list. It is available on most of the longer lists, such as customers and products. This is why edge swiping cannot be used to open the navigation drawer, as on most apps. The only way it open the navigation drawer is to tap on the home icon.
Fast scroll is a mechanism that allows the user to scroll through a list of data much faster than usual. All the larger lists in the mobile app, such as products and customers, support this feature. To use it, tap and hold the tab on the scroll bar.
If a large letter appears, as in the screenshot on the right, then the list supports fast scrolling. To use it, move the tab on the scroll bar, while keeping it held down. The list will scroll much faster than it usually does. The large letter is the first character in the name or id of the item at the top of the screen (depending on how the list is sorted).
When an action bar has too many options to be displayed on the screen, some of them are moved to an overflow menu. When this occurs, an overflow icon appears in the right had corner of the action bar, as shown in the screenshot on the right. When this icon is tapped, the remaining options are displayed as a drop-down list, as shown below.
This is a standard feature of Android, but it is worth mentioning here because not all users are aware of it, and screens in the mobile app have more options than most. So if the text refers to say a map button on the Customers screen, and there does not appear to be one, the user should check the overflow menu. To see if it has been moved there.
The mobile app produces documents (invoices, credit notes and quotations), each of which is identified by its order id. These numbers should be unique. but two users might accidentally use the same id, for two completely different document.
The mobile app remembers the order id of the last document produced, and increments it every time a new one is generated. To avoid conflicts, the system administrator should assign a different range of order ids to each employee.
The Employee Id is only a foreign key in Customers, but is part of the primary key of both the Orders table and the Order Lines table. So if two employees accidentally use the same Order Id, both orders will be saved in the database. Neither order will be overwritten, but they will both will have the same Order Id.
Checking for duplicates
The hosting service has a menu option Orders > Duplicates. For self-hosted servers, the following SQL can be used to to check for duplicate order ids:
SELECT orderId, employeeId, orderDate, stamp
WHERE orderId in (
GROUP BY orderId
HAVING COUNT( * )>1)
ORDER BY orderId, employeeId, orderDate';
The gallery below shows how to download and install the Android client as an APK file. You might want to do this if you do not have access to Google Play, or if you want to install an older version of the app.
If you already have an APK file, you can skip the first two steps. The gallery assumes that you have already installed the File Manager+ app. If not, there is an option in the sidebar that will install it for you.
Launch the Settings app, go to the Security page, and turn on the Unknown sources option. Otherwise you can only install apps from Google Play.
Launch the Chrome app, navigate to the Vanguard Software website, and download Android APK file, using the option in the sidebar.
Launch the File Manager+ app, navigate to the Downloads folder, and open the APK file.
Allow the permissions requested by the Sales Manager.
The Sales app is installed.
The Sales app is launched. This is when the Vanguard folder is created.