[inv 1.5] Inventory Purchase and Control via PHP


Am very grateful, I will try out and let you know, thanks Man


where do I do this from, I mean where do I add the Html viewer widget from, and where do I get the property editor from I have been searching the forum but no such tutorial .

Sorry for my queries for am still learning Sambapos, Thanks in advance,


This only works for Entity Screens that are configured with the View Mode of “Custom” or “Layout”. You cannot modify Screens that are configured with the View Mode of “Automatic” or “Search”.

When you see the Entity Screen, right-click near the center to reveal a context-menu:

  • right-click and select Design Mode (a checkmark will appear to the left of it)
  • right-click and select Add Widget > HTML Viewer

Now click on the Widget to select it. A “bounding-box” will appear around the Widget to indicate it is selected.
You can then drag the corners or sides of the “bounding-box” to resize it.

Near the inside edge of the “bounding-box” for the Widget you can right-click and then select Settings [HTML Viewer]. The Settings dialog will appear. Edit the values and click Ok.

When you are done, right-click and (de)select Design Mode (the checkmark will disappear).


Wow!, am always leaning in sambapos, thanks


Am using V4 and without mapping for payout entity screen how will I enter design mode, when I enter the mapping I can see the design mode but without that I cant see

Configure your Entity Screen

No Mapping required.


And when I add the mapping and do all the configurations this is what i get as in the attachment


@QMcKay what is it that am not doing right, It seems am missing something. Am using V4

Will appreciate your help


That looks like the static HTML template… a file like index.htm or index.html.

What you want is to use the index.php file.

So you can either enter that manually in the address bar, or modify your IIS settings to re-order the priority of index files, placing index.php before any other files in the list.

Or, you can delete index.html file but be sure to keep index.php


Tested code and wow undefined variables and lots of undefined indexes


PHP Notice: Undefined variable: updir in C:\inetpub\wwwroot\zincludes\config.php on line 23
PHP Notice: Undefined variable: updir in C:\inetpub\wwwroot\zincludes\config.php on line 26
PHP Notice: Undefined variable: updir in C:\inetpub\wwwroot\zincludes\config.php on line 27
PHP Notice: Undefined index: igroupcodefilter in C:\inetpub\wwwroot\zincludes\sessions.php on line 11
PHP Notice: Undefined index: s_igroupcodefilter in C:\inetpub\wwwroot\zincludes\sessions.php on line 21
PHP Notice: Undefined index: warehousefilter in C:\inetpub\wwwroot\zincludes\sessions.php on line 27
PHP Notice: Undefined index: s_warehousefilter in C:\inetpub\wwwroot\zincludes\sessions.php on line 37
PHP Notice: Undefined index: collapsesection in C:\inetpub\wwwroot\zincludes\sessions.php on line 43
PHP Notice: Undefined offset: 1 in C:\inetpub\wwwroot\zincludes\sessions.php on line 68
PHP Notice: Undefined variable: logout in C:\inetpub\wwwroot\zincludes\sessions.php on line 78
PHP Notice: Undefined index: s_currentuser in C:\inetpub\wwwroot\zincludes\sessions.php on line 85
PHP Notice: Undefined variable: styler in C:\inetpub\wwwroot\zincludes\configz.php on line 137
PHP Notice: Undefined variable: updir in C:\inetpub\wwwroot\zincludes\configz.php on line 141
PHP Notice: Undefined variable: updir in C:\inetpub\wwwroot\zincludes\configz.php on line 142
PHP Notice: Undefined index: screen in C:\inetpub\wwwroot\zincludes\zprepage.php on line 9
PHP Notice: Undefined index: operation in C:\inetpub\wwwroot\zincludes\zprepage.php on line 47
PHP Notice: Undefined index: warehouseid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 48
PHP Notice: Undefined index: warehousetypeid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 49
PHP Notice: Undefined index: supplierid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 50
PHP Notice: Undefined index: suppliertypeid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 51
PHP Notice: Undefined index: supplierfilter in C:\inetpub\wwwroot\zincludes\zprepage.php on line 52
PHP Notice: Undefined index: productid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 53
PHP Notice: Undefined index: producttypeid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 54
PHP Notice: Undefined index: producttypefilter in C:\inetpub\wwwroot\zincludes\zprepage.php on line 55
PHP Notice: Undefined index: txid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 56
PHP Notice: Undefined index: inventoryid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 57
PHP Notice: Undefined index: dtrequest in C:\inetpub\wwwroot\zincludes\zprepage.php on line 58
PHP Notice: Undefined index: dtfulfill in C:\inetpub\wwwroot\zincludes\zprepage.php on line 59
PHP Notice: Undefined index: packagetypeid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 60
PHP Notice: Undefined index: packagetypeid1 in C:\inetpub\wwwroot\zincludes\zprepage.php on line 61
PHP Notice: Undefined index: packagetypeid2 in C:\inetpub\wwwroot\zincludes\zprepage.php on line 62
PHP Notice: Undefined index: packagetypeid3 in C:\inetpub\wwwroot\zincludes\zprepage.php on line 63
PHP Notice: Undefined index: quantity in C:\inetpub\wwwroot\zincludes\zprepage.php on line 64
PHP Notice: Undefined index: quantity1 in C:\inetpub\wwwroot\zincludes\zprepage.php on line 65
PHP Notice: Undefined index: quantity2 in C:\inetpub\wwwroot\zincludes\zprepage.php on line 66
PHP Notice: Undefined index: quantity3 in C:\inetpub\wwwroot\zincludes\zprepage.php on line 67
PHP Notice: Undefined index: noteid in C:\inetpub\wwwroot\zincludes\zprepage.php on line 69
PHP Fatal error: Call to undefined function mysql_escape_string() in C:\inetpub\wwwroot\zincludes\zprepage.php on line 70


Possibly you would see warnings about those things depending on the version of PHP being used. You can of course suppress the “PHP Notice” messages by setting your PHP error_reporting variable to do so.

The following error message would depend on PHP version and/or included extensions (the system obviously does not use MySQL (it uses MSSQL), but the function was borrowed from it’s inclusion):

Call to undefined function mysql_escape_string()

The code in the ZIP was written to “work” with PHP 5 (5.6.0 IIRC).

In my personal copy, updates have been made to be compatible with PHP 7 and SambaPOS 5.2.3 and the MySQL function calls have been removed or replaced.

I have no plans to release an updated version to the public.