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.
The diagram shows the schema for the web server, which can handle any number of users. The one for the mobile client is similar, except that it is for single user. There is no employees table, and no employee Id fields in the other tables.
Referential integrity is not enforced, and can be broken if the wrong data is uploaded to the server. If a reference is missing, the mobile app attempts to fail gracefully.
Most of the differences between the two apps are due to differences in the underlying platforms. Android and iOS have different design criteria, and each app is developed as a native app for its own platform. No attempt is made to copy features directly from one app to the other, without changing them to match the design standards of the new platform.
Some features are only available on one of the two platforms (usually Android). For instance Android devices have SD slots, while iOS ones do not. When this happens, the decision whether to use the feature at all is taken on merit. Some minor features can be omitted altogether. Others are so important that they have to be included, albeit on one platform only.
The Sales Manager mobile app has a large number of screens, and navigating between them is particularly important. The traditional hierarchical menu structure offered by both Android and iOS is slow and time consuming.
Android offers another solution for larger apps, called the Navigation Drawer. This allows the developer to present a menu for the entire app, as a drop-down list. The top part of the navigation drawer for the Android app is shown on the right.
Unfortunately no such paradigm exists on the iOS platform, and the iOS app is stuck with an old-fashioned, hierarchical menu system.
Although it is not quite as important as the navigation drawer, split screen mode is another feature that is only available on Android. iOS offers some limited support for split screen mode, but not in a form that can be used by the mobile app. Split screen is only available on Android tablets, in horizontal mode.
Using both Platforms
It is possible to use a mixture of Android and iOS devices, but there are a number of caveats:
Separate payments must be made to Google Play and iTunes. Payments made on one platform cannot be transferred to the other.
It may not be possible to transfer an SQLite database from one platform to the other, due to their running different versions of SQLite. It used to be possible before they diverged, but now it is probably only possible one way round.
On a brighter note, all versions of the web server support both platforms equally well. The transactions are the same in both cases.
Apps bought on Google Play can be used on any Android device without paying again. However, each device must have the same Google Account on it. Once a purchase has been made, it may be restored to any other other device. The only proviso is that they must use the same Google or Apple account.
Android purchases may be restored on a second device by tapping the Restore button in the action bar, as shown in the screenshot on the right. The process is more or less identical for iOS devices.
The External Storage on an Android device is an area to which apps can read and write files. The Android client uses it to back up the database, and to store product images. Traditionally it was an SD card, but in most modern devices it is located in internal storage, on the flash ROM.
Database backups are not shown in File Explorer, but they are visible in file manager apps. We recommend File Manager+, which can be installed using the link in the sidebar.
The gallery below shows how to locate the Vanguard folder, using File Manager+. The Vanguard folder, and the images folder inside it, are both created when the Sales app is launched (not when it is installed).
The gallery below shows how to access the internal storage on an Android device, connected over USB.
The product images must all be places in the /Vanguard/images folder.
The file names must mach the names of the products.
The extensions must all be “.jpg”.
Each product image should be roughly square, and no larger than 100 KB.
After the product images have been copied to the device, the thumbnails should be created, using the Create Thumbnails option on the SD Card screen of the Android client.
Android 11 no longer supports external storage. Version 7.1.0 is due to replace it with Google Drive.