The About page

The About page is displayed when the user selects the About option, on the main menu of the mobile app. It displays important information about the app:

  1. The Version number determines the precise build of the app.
  2. The Device Id uniquely identifies the mobile device. It can be the IMEI number, the MAC number, or some other number determined by the Android OS.
  3. The Locale is chosen by the user, in the Android settings. It determines how dates, times, numbers, percentages and amounts of money are displayed.
  4. The Profile indicates which profile is being used.

Avoiding duplicate order ids


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.

Mobile app

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.

Database design

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
FROM orders
WHERE orderId in (
SELECT orderId
FROM orders
GROUP BY orderId
ORDER BY orderId, employeeId, orderDate';

Sideloading the Android APK file

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.

  1. 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.
  2. Launch the Chrome app, navigate to the Vanguard Software website, and download Android APK file, using the option in the sidebar.
  3. Launch the File Manager+ app, navigate to the Downloads folder, and open the APK file.
  4. Allow the permissions requested by the Sales Manager.
  5. The Sales app is installed.
  6. The Sales app is launched. This is when the Vanguard folder is created.


Field types

The field types are as used in Microsoft Access, viz:

Name Contents
Boolean boolean value
Byte 1-byte integer
Currency decimal value, with up to 28 digits
Double 64-bit floating point value
Long 4-byte integer
Memo string of arbitrary length
Text short string with up to 255 characters
  • None of the fields are nullable. The default values for text strings is a zero-length string, and the default values for numeric values is zero.
  • Boolean values are stored as bytes, with the usual convention that zero is false, and any other value is true.
  • Percentages are divided by 100, e.g. 20% is stored as 0.2. This is the standard method for representing percentages.



Client and server versions

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

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.

Table layouts


categoryTextName in breadcrumb format.


sectionIntegerSection number: 0=order header, 1=detail line
seqIntegerOrder in which control appears within section.
typeIntegerControl type: 0=header, 1=spinner, 2=checkbox, 3=text.
nameTextThe name of the control, as shown to the user.
valsTextAny additional values. For spinners, this is a list of options, separated by commas.


customerIdTextUnique id of customer.
employeeIdLongEmployee who sells to customer.
priceListByteInteger between 0 and 4.
taxCodeTextCan be left blank.
nameTextName of customer.
addressTextStreet address.
postalCodeTextPost code or zip code.
contactTextName of contact.
contactTitleTextJob title of contact.
phoneTextPhone number.
emailTextEmail address.
notesMemoNotes about the order.
discountDoubleDefault value for new orders.
dirtyBooleanSet when record is uploaded.


employeeIdLongUnique id of employee.
nameTextName of employee.
passwordTextPassword for web server.
restrictedBooleanCannot change company data.

Order Details

employeeIdLongEmployee who created the order.
orderIdLongUnique id of order.
productIdTextUnique id of product.
unitPriceCurrencyUnit price.
taxCodeTexttax code.
taxRateDoubletax rate.


employeeIdLongEmployee who created the order .
orderIdLongUnique id of order
customerIdTextUnique id of customer.
orderDateTextDate of order.
requiredDateTextDate when order is required.
shipperTextDelivery method.
freightCurrencyDelivery charge.
shipNameTextName of recipient.
shipAddressTextDelivery address.
stampTextSet when order was uploaded.
typeByte0=invoice, 1=credit note, 2=quote.
dirtyBooleanSet when record is uploaded.


productIdTextUnique id of product.
nameTextName of product.
categoryTextProduct category.
priceCurrencyMain price.
price1CurrencyAlternative prices.
taxCodeTextTax code.
discontinuedBooleanProduct is not available.
bandingTextPrice banding, e.g. 1-10-100.
stockDoubleCurrent stock level.


shipperTextName of shipping method.

Special Prices

customerIdTextUnique id of customer.
productIdTextUnique id of product.
priceDoubleSpecial price.
descriptionTextReason for awarding special price.

Tax Rates

codeTextCode printed on invoices.
descriptionTextDescription of tax rate.
rateDoubleRate as percentage.
seqLongSequence in which rate appears.

Platform differences

Platform Dependency

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.

Navigation Drawer

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.

Split Screen

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:

  1. Separate payments must be made to Google Play and iTunes. Payments made on one platform cannot be transferred to the other.
  2. 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.
  3. On a brighter note, all versions of the web server support both platforms equally well. The transactions are the same in both cases.

Restoring purchases

Store screen

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.


Using external storage


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.

File Manager

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).

File Explorer

The gallery below shows how to access the internal storage on an Android device, connected over USB.

Product Images

  1. The product images must all be places in the /Vanguard/images folder.
  2. The file names must mach the names of the products.
  3. The extensions must all be “.jpg”.
  4. 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.