Selaa lähdekoodia

Code refactoring for the unified gui code.

mingodad 13 vuotta sitten
vanhempi
sitoutus
d8a54e8423
5 muutettua tiedostoa jossa 11387 lisäystä ja 26 poistoa
  1. 2 0
      SquiLu-ourbiz/gui2nut
  2. 2 0
      SquiLu-ourbiz/mk-zexe
  3. 118 26
      SquiLu-ourbiz/ourbiz-fltk.nut
  4. 4435 0
      SquiLu-ourbiz/ourbiz-gui.fl
  5. 6830 0
      SquiLu-ourbiz/ourbiz-gui.nut

+ 2 - 0
SquiLu-ourbiz/gui2nut

@@ -0,0 +1,2 @@
+#!/bin/sh
+squilu fluid2SquiLu.nut ourbiz-gui.fl ourbiz-gui.nut

+ 2 - 0
SquiLu-ourbiz/mk-zexe

@@ -0,0 +1,2 @@
+squilu squilufreeze.nut /home/mingo/bin/squilu sqlite3-cc2.nut sqlite3-cc
+

+ 118 - 26
SquiLu-ourbiz/ourbiz-fltk.nut

@@ -306,7 +306,7 @@ class Fl_Choice_dbAction extends Fl_Choice {
 
 
 local app_help_window = null;
 local app_help_window = null;
 
 
-class MyBaseWindow extends Fl_Window {
+class Base_Window extends Fl_Window {
 	childWindows=null;
 	childWindows=null;
 	_db_map = null;
 	_db_map = null;
 
 
@@ -625,7 +625,7 @@ class DBUpdateByWidget extends DBTableUpdate
 	}
 	}
 }
 }
 
 
-class EditWindow extends MyBaseWindow {
+class Edit_Base_Window extends Base_Window {
 	_record = null;
 	_record = null;
 	_dbUpdater = null;
 	_dbUpdater = null;
 	_choiceDbAction = null;
 	_choiceDbAction = null;
@@ -781,7 +781,10 @@ class Fl_Data_Table extends Flv_Data_Table {
 		//has_scrollbar(FLVS_BOTH);
 		//has_scrollbar(FLVS_BOTH);
 	}
 	}
 
 
-	function for_print(bval){_forPrint = bval; }
+	function for_print(bval){
+		_forPrint = bval; 
+		if(_forPrint) box(FL_NO_BOX);
+	}
 
 
 	function resize(ax, ay, aw, ah){
 	function resize(ax, ay, aw, ah){
 		base.resize(ax, ay, aw, ah);
 		base.resize(ax, ay, aw, ah);
@@ -1059,25 +1062,10 @@ class Fl_Data_Table_Calendar extends Fl_Data_Table {
 
 
 dofile("search-options.nut");
 dofile("search-options.nut");
 dofile("utils-fltk.nut");
 dofile("utils-fltk.nut");
-dofile("help-view-gui.nut");
+dofile("ourbiz-gui.nut");
 dofile("help-view.nut");
 dofile("help-view.nut");
 dofile("fl-bar-chart.nut");
 dofile("fl-bar-chart.nut");
-dofile("barchart-gui.nut");
-dofile("history-gui.nut");
-dofile("delivery-calc-gui.nut");
-dofile("calendar-gui.nut");
 dofile("calendar-utils.nut");
 dofile("calendar-utils.nut");
-dofile("base-report-A4.nut");
-dofile("invoice-A4.nut");
-dofile("order-page-gui.nut");
-dofile("print-preview-gui.nut");
-dofile("groups-tree-gui.nut");
-dofile("product-kit-gui.nut");
-dofile("product-prices-gui.nut");
-dofile("edit-product-window.nut");
-dofile("edit-entity-window.nut");
-dofile("edit-order-window.nut");
-dofile("list-search-window.nut");
 
 
 class MyBarChart extends BarChartGroup {
 class MyBarChart extends BarChartGroup {
 	
 	
@@ -1123,7 +1111,7 @@ class MyBarChart extends BarChartGroup {
 	}
 	}
 }
 }
 
 
-class MyListSearchWindow extends ListSearch {
+class MyListSearchWindow extends ListSearchWindow {
 	_popup = null;
 	_popup = null;
 	_search_options = null;
 	_search_options = null;
 	_sab = null;
 	_sab = null;
@@ -1387,8 +1375,6 @@ class OurEntityGroups extends OurTreeGroups
 };
 };
 
 
 
 
-dofile("sales-tax-window.nut");
-
 class OurSalesTax extends SalesTaxRatesEditWindow {
 class OurSalesTax extends SalesTaxRatesEditWindow {
 	constructor(){
 	constructor(){
 		base.constructor();
 		base.constructor();
@@ -2284,7 +2270,7 @@ class OrdersListSearch extends MyListSearchWindow {
 	}
 	}
 }
 }
 
 
-class PaymentsListSearch extends ListSearch {
+class PaymentsListSearch extends ListSearchWindow {
 
 
 	constructor() {
 	constructor() {
 		base.constructor();
 		base.constructor();
@@ -2292,10 +2278,116 @@ class PaymentsListSearch extends ListSearch {
 	}
 	}
 }
 }
 
 
-dofile("main-window.nut");
+class MyMainWindow extends MainWindow {
+	constructor() {
+		base.constructor();
+		label(_tr("OurBiz"));
+		btnOrdersSales->callback(cb_btnOrdersSales);
+		btnPaymentsSales->callback(cb_btnPaymentsSales);
+		btnEntitiesSales->callback(cb_btnEntitiesSales);
+		btnProductsSales->callback(cb_btnProductsSales);
+		btnOrdersBuys->callback(cb_btnOrdersBuys);
+		btnPaymentsBuys->callback(cb_btnPaymentsBuys);
+		btnProductsBuys->callback(cb_btnProductsBuys);
+		btnEntitiesBuys->callback(cb_btnEntitiesBuys);
+		btnOrders->callback(cb_btnOrders);
+		btnPayments->callback(cb_btnPayments);
+		btnEntities->callback(cb_btnEntities);
+		btnProducts->callback(cb_btnProducts);
+		btnGLGroups->callback(cb_btnGLGroups);
+		btnGLChart->callback(cb_btnGLChart);
+		btnGLTransactions->callback(cb_btnGLTransactions);
+		btnOrdersSum->callback(cb_btnOrdersSum);
+		btnSalesTaxRates->callback(cb_btnSalesTaxRates);
+		btnOrderTypes->callback(cb_btnOrderTypes);
+		btnPaymentTypes->callback(cb_btnPaymentTypes);
+		btnMeasureUnits->callback(cb_btnMeasureUnits);
+		btnWarrantyTypes->callback(cb_btnWarrantyTypes);
+		btnImages->callback(cb_btnImages);
+		btnProductGroups->callback(cb_btnProductGroups);
+		btnEntityGroups->callback(cb_btnEntityGroups);
+		btnConfig->callback(cb_btnConfig);
+		btnOpenDB->callback(cb_btnOpenDB);
+		btnTranslations->callback(cb_btnTranslations);
+		btnAppUsers->callback(cb_btnAppUsers);
+	}
+	function cb_btnEntitiesSales(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Entities Sales List/Search", EntitiesListSearch);
+	}
+	function cb_btnPaymentsSales(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Payments Sales List/Search", PaymentsListSearch);
+	}
+	function cb_btnOrdersSales(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Orders Sales List/Search", OrdersListSearch);
+	}
+	function cb_btnProductsSales(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Products Sales List/Search", ProductsListSearch);
+	}
+	function cb_btnOrdersBuys(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Orders Buys List/Search", OrdersListSearch);
+	}
+	function cb_btnPaymentsBuys(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Payments Buys List/Search", PaymentsListSearch);
+	}
+	function cb_btnProductsBuys(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Products Buys List/Search", ProductsListSearch);
+	}
+	function cb_btnEntitiesBuys(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Entities Buys List/Search", EntitiesListSearch);
+	}
+	function cb_btnOrders(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Orders List/Search", OrdersListSearch);
+	}
+	function cb_btnPayments(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Payments List/Search", PaymentsListSearch);
+	}
+	function cb_btnEntities(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Entities List/Search", EntitiesListSearch);
+	}
+	function cb_btnProducts(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Products List/Search", ProductsListSearch);
+	}
+	function cb_btnGLGroups(){print(__LINE__);}
+	function cb_btnGLChart(){print(__LINE__);}
+	function cb_btnGLTransactions(){print(__LINE__);}
+	function cb_btnOrdersSum(){print(__LINE__);}
+	function cb_btnSalesTaxRates(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Sales Tax Rates List/Edit", OurSalesTax);
+	}
+	function cb_btnOrderTypes(){print(__LINE__);}
+	function cb_btnPaymentTypes(){print(__LINE__);}
+	function cb_btnMeasureUnits(){print(__LINE__);}
+	function cb_btnWarrantyTypes(){print(__LINE__);}
+	function cb_btnImages(){print(__LINE__);}
+	function cb_btnProductGroups(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Product Groups", OurProductGroups);
+	}
+	function cb_btnEntityGroups(sender, udata){
+		this = sender.window();
+		local win = showChildWindow("Entity Groups", OurEntityGroups);
+	}
+	function cb_btnConfig(){print(__LINE__);}
+	function cb_btnOpenDB(){print(__LINE__);}
+	function cb_btnTranslations(){print(__LINE__);}
+	function cb_btnAppUsers(){print(__LINE__);}
+	function reset_all_child_windows_ptr(){print(__LINE__);}
+}
 
 
-local win = new MainWindow(10, 50, 330, 320, "OURBIZ");
-//local win = new SalesTaxRatesEditWindow();
+local win = new MyMainWindow();
 win->resizable(win);
 win->resizable(win);
 win->show_main();
 win->show_main();
 
 

+ 4435 - 0
SquiLu-ourbiz/ourbiz-gui.fl

@@ -0,0 +1,4435 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 1.0302 
+i18n_type 1 
+i18n_include i18n_function.h 
+i18n_function _tr 
+header_name {.h} 
+code_name {.cxx}
+widget_class HelpWindow {
+  label Help
+  xywh {76 128 600 400} type Double hide resizable
+  class Base_Window
+} {
+  Fl_Tabs tabs {
+    dirty_name tabs open
+    xywh {5 5 590 355} labelsize 16 resizable
+  } {
+    Fl_Group tabView {
+      label View
+      dirty_name tabView open
+      xywh {5 30 590 330} resizable
+    } {
+      Fl_Help_View view_html {
+        dirty_name view_html
+        xywh {5 30 590 330} labelsize 16
+      }
+    }
+    Fl_Group tabEdit {
+      label Edit
+      dirty_name tabEdit open
+      xywh {5 30 590 310} hide
+    } {
+      Fl_Text_Editor help_text {
+        dirty_name help_text
+        xywh {5 30 590 310} labelsize 18 textsize 18 resizable
+        class Fl_Text_Editor_Buffered
+      }
+    }
+  }
+  Fl_Group {} {open
+    xywh {5 370 590 25}
+  } {
+    Fl_Input words_to_search {
+      label {@search}
+      dirty_name words_to_search
+      xywh {34 370 225 25} labelsize 18 textsize 18 resizable
+    }
+    Fl_Button btnSearchHelp {
+      label Search
+      dirty_name btnSearchHelp
+      xywh {265 370 80 25} labelsize 16
+    }
+    Fl_Button btnSavehelp {
+      label Save
+      dirty_name btnSavehelp
+      xywh {350 370 80 25} labelsize 16 deactivate
+    }
+    Fl_Button btnBackward {
+      label {@<-}
+      dirty_name btnBackward
+      xywh {435 370 25 25} labelcolor 63
+    }
+    Fl_Button btnTop {
+      label {@8->}
+      dirty_name btnTop
+      xywh {470 370 25 25} labelcolor 63
+    }
+    Fl_Button btnForward {
+      label {@->}
+      dirty_name btnForward
+      xywh {503 370 25 25} labelcolor 63
+    }
+    Fl_Button btnFontSmaller {
+      label F
+      dirty_name btnFontSmaller
+      xywh {536 370 25 25} labelfont 1 labelsize 10
+    }
+    Fl_Button btnFontBigger {
+      label F
+      dirty_name btnFontBigger
+      xywh {569 370 25 25} labelfont 1
+    }
+  }
+} 
+
+widget_class CalendarWindow {
+  label Calendar
+  xywh {732 184 350 305} type Double labelsize 16 hide
+  class Base_Window
+} {
+  Fl_Box label_month {
+    label Calendar
+    xywh {5 5 340 25} box ENGRAVED_BOX color 7 labelsize 16
+  }
+  Fl_Group {} {open
+    xywh {6 35 340 25} labelsize 16
+  } {
+    Fl_Button btnMonth1 {
+      label 1
+      xywh {6 35 25 25}
+    }
+    Fl_Button btnMonth2 {
+      label 2
+      xywh {34 35 25 25}
+    }
+    Fl_Button btnMonth3 {
+      label 3
+      xywh {63 35 25 25}
+    }
+    Fl_Button btnMonth4 {
+      label 4
+      xywh {91 35 25 25}
+    }
+    Fl_Button btnMonth5 {
+      label 5
+      xywh {120 35 25 25}
+    }
+    Fl_Button btnMonth6 {
+      label 6
+      xywh {148 35 25 25}
+    }
+    Fl_Button btnMonth7 {
+      label 7
+      xywh {177 35 25 25}
+    }
+    Fl_Button btnMonth8 {
+      label 8
+      xywh {205 35 25 25}
+    }
+    Fl_Button btnMonth9 {
+      label 9
+      xywh {234 35 25 25}
+    }
+    Fl_Button btnMonth10 {
+      label 10
+      xywh {262 35 25 25}
+    }
+    Fl_Button btnMonth11 {
+      label 11
+      xywh {291 35 25 25}
+    }
+    Fl_Button btnMonth12 {
+      label 12
+      xywh {320 35 25 25}
+    }
+  }
+  Fl_Browser calendar_table {
+    xywh {5 65 340 202} labeltype NO_LABEL labelsize 16
+    class Fl_Virtual_Table
+  }
+  Fl_Group {} {open
+    xywh {5 275 340 25} labelsize 16
+  } {
+    Fl_Button btnPrevYear {
+      label {@<<}
+      tooltip {Go to previous year} xywh {5 275 50 25} labelsize 16
+      class Fl_Repeat_Button
+    }
+    Fl_Button btnPrevMonth {
+      label {@<}
+      tooltip {Go to previous month} xywh {63 275 50 25} labelsize 16
+      class Fl_Repeat_Button
+    }
+    Fl_Button btnToday {
+      label {@<->}
+      tooltip {Go to today date} xywh {121 275 50 25} labelsize 16
+    }
+    Fl_Button btnSelect {
+      label {@circle}
+      tooltip {Select current date} xywh {179 275 50 25} labelsize 16
+    }
+    Fl_Button btnNextMonth {
+      label {@>}
+      tooltip {Go to next month} xywh {237 275 50 25} labelsize 16
+      class Fl_Repeat_Button
+    }
+    Fl_Button btnNextYear {
+      label {@>>}
+      tooltip {Go to next year} xywh {295 275 50 25} labelsize 16
+      class Fl_Repeat_Button
+    }
+  }
+} 
+
+widget_class DeliveryCalcWindow {
+  label {Delivery Calc}
+  xywh {338 167 415 285} type Double labelsize 16 hide
+  class Base_Window
+} {
+  Fl_Input gui_destination_zone {
+    label {Destination Zone}
+    dirty_name gui_destination_zone
+    xywh {10 25 395 25} labelsize 16 align 5 textsize 16
+    class Flu_Combo_List
+  }
+  Fl_Input gui_destination_city {
+    label {Destination City}
+    dirty_name gui_destination_city
+    xywh {10 80 395 25} labelsize 16 align 5 textsize 16
+    class Flu_Combo_List
+  }
+  Fl_Input gui_weight {
+    label Weight
+    dirty_name gui_weight
+    xywh {10 132 100 25} type Float labelsize 16 align 5 textfont 1 textsize 16
+  }
+  Fl_Output gui_cost {
+    label Cost
+    dirty_name gui_cost
+    xywh {130 133 130 24} labelsize 16 align 5 textsize 16
+    code0 {o->right_to_left(1);}
+    code1 {o->use_numeric_format(1);}
+  }
+  Fl_Output gui_discount {
+    label Discount
+    dirty_name gui_discount
+    xywh {276 131 130 24} labelsize 16 align 5 textsize 16
+    code0 {o->right_to_left(1);}
+    code1 {o->use_numeric_format(1);}
+  }
+  Fl_Output gui_subtotal {
+    label Subtotal
+    dirty_name gui_subtotal
+    xywh {130 185 130 24} labelsize 16 align 5 textsize 16
+    code0 {o->right_to_left(1);}
+    code1 {o->use_numeric_format(1);}
+  }
+  Fl_Output gui_insurance {
+    label Insurance
+    dirty_name gui_insurance
+    xywh {275 181 130 24} labelsize 16 align 5 textsize 16
+    code0 {o->right_to_left(1);}
+    code1 {o->use_numeric_format(1);}
+  }
+  Fl_Output gui_increment {
+    label Increment
+    dirty_name gui_increment
+    xywh {276 219 130 24} labelsize 16 textsize 16
+    code0 {o->right_to_left(1);}
+    code1 {o->use_numeric_format(1);}
+  }
+  Fl_Output gui_total {
+    label Total
+    dirty_name gui_total
+    xywh {276 253 130 24} labelsize 16 textfont 1 textsize 16
+    code0 {o->right_to_left(1);}
+    code1 {o->use_numeric_format(1);}
+  }
+  Fl_Button gui_btnCalc {
+    label Calc
+    dirty_name gui_btnCalc
+    tooltip {Calculate the delivery price} xywh {10 217 100 25} labelsize 16
+  }
+  Fl_Button gui_btnAdd {
+    label Add
+    dirty_name gui_btnAdd
+    tooltip {Add the calculated value on the invoice line} xywh {10 252 100 25} labelsize 16
+  }
+} 
+
+widget_class ListSearchWindow {
+  label {List Search}
+  xywh {132 118 800 560} type Double labelsize 16 hide resizable
+  class Base_Window
+} {
+  Fl_Group topGroup {open
+    xywh {0 0 800 35} labelsize 16
+  } {
+    Fl_Input group_filter {
+      dirty_name group_filter
+      xywh {5 5 675 25} labeltype NO_LABEL labelsize 16 textsize 16
+      class Flu_Combo_List
+    }
+    Fl_Input query_limit {
+      xywh {690 6 60 25} type Int labeltype NO_LABEL labelsize 16 textsize 16
+      code0 {o->value("50");}
+    }
+    Fl_Button btnNotes {
+      label {?}
+      xywh {760 6 35 25} labelsize 16
+    }
+  }
+  Fl_Group middleGroup {open
+    xywh {0 41 800 409} labelsize 16 resizable
+  } {
+    Fl_Browser grid {
+      dirty_name grid
+      xywh {5 41 790 389} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+      class Fl_Data_Table
+    }
+  }
+  Fl_Group bottomGroup {open
+    xywh {4 440 790 115} box ENGRAVED_BOX color 246 labelsize 16
+  } {
+    Fl_Pack pack_search_options {open
+      xywh {14 450 320 25} type HORIZONTAL labelsize 16
+      code0 {o->spacing(10);}
+    } {}
+    Fl_Input search_str {
+      label {@search}
+      dirty_name search_str
+      xywh {35 485 299 25} labelsize 16 when 8 textsize 16
+    }
+    Fl_Button btnSearch {
+      label Search
+      xywh {345 485 100 25} labelsize 16
+    }
+    Fl_Button btnSelect {
+      label Select
+      xywh {14 520 100 25} labelsize 16
+    }
+    Fl_Button btnUpdate {
+      label Update
+      xywh {124 520 100 25} labelsize 16
+    }
+    Fl_Button btnInsert {
+      label Insert
+      xywh {234 520 100 25} labelsize 16
+    }
+    Fl_Button btnThumbImage {
+      xywh {663 445 125 105} box NO_BOX align 80
+      class Fl_Image_Box
+    }
+    Fl_Box {} {
+      xywh {650 445 5 105} labeltype NO_LABEL labelsize 16 align 80 resizable
+    }
+    Fl_Pack pack_search_options2 {open
+      xywh {345 520 300 25} type HORIZONTAL labelsize 16
+      code0 {o->spacing(10);}
+    } {}
+  }
+} 
+
+widget_class BarChartGroup {
+  label BarChartGroup
+  xywh {288 260 760 460} type Double labelsize 16 hide resizable position_relative
+} {
+  Fl_Pack pack {open
+    xywh {0 0 760 25} type HORIZONTAL labelsize 16
+    code0 {o->spacing(10);}
+  } {
+    Fl_Button btnShowChart {
+      label Show
+      xywh {0 0 96 25} labelsize 16
+    }
+    Fl_Input periodes_to_show {
+      tooltip {Write then number of periodes you want to see} xywh {106 0 80 25} type Int labeltype NO_LABEL labelsize 16 textsize 16
+      code0 {o->value("12");}
+    }
+    Fl_Round_Button btn_periode_is_years {
+      label Years
+      dirty_name btn_periode_is_years
+      xywh {196 0 110 25} type Radio down_box ROUND_DOWN_BOX labelsize 16
+    }
+    Fl_Round_Button btn_periode_is_months {
+      label Months
+      dirty_name btn_periode_is_months
+      xywh {316 0 110 25} type Radio down_box ROUND_DOWN_BOX labelsize 16
+      code0 {o->setonly();}
+    }
+    Fl_Round_Button btn_periode_is_weeks {
+      label Weeks
+      dirty_name btn_periode_is_weeks
+      xywh {436 0 110 25} type Radio down_box ROUND_DOWN_BOX labelsize 16
+    }
+    Fl_Round_Button btn_periode_is_days {
+      label Days
+      dirty_name btn_periode_is_days
+      xywh {556 0 110 25} type Radio down_box ROUND_DOWN_BOX labelsize 16
+    }
+    Fl_Check_Button chkOpt {
+      dirty_name chkOpt
+      xywh {660 5 64 15} down_box DOWN_BOX hide
+    }
+  }
+  Fl_Box bar_chart {
+    dirty_name bar_chart
+    xywh {0 30 760 430} color 7 labeltype NO_LABEL labelsize 16 align 5 resizable
+    code0 {\#include "Fl_Bar_Chart.h"}
+    class Fl_Bar_Chart
+  }
+} 
+
+widget_class HistoryGroup {
+  label History
+  xywh {13 33 760 465} type Double labelsize 16 hide resizable position_relative
+} {
+  Fl_Pack {} {open
+    xywh {0 0 760 25} type HORIZONTAL labelsize 16
+    code0 {o->spacing(10);}
+  } {
+    Fl_Choice history_choice {open
+      xywh {0 0 564 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    } {}
+    Fl_Input history_query_limit {
+      tooltip {Write then number of periodes you want to see} xywh {574 0 80 25} type Int labeltype NO_LABEL labelsize 16 textsize 16
+      code0 {o->value("50");}
+    }
+    Fl_Button btnViewDocHsitory {
+      label {View Doc.}
+      xywh {664 0 96 25} labelsize 16
+    }
+  }
+  Fl_Browser grid_history {
+    xywh {0 33 760 432} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+} 
+
+widget_class BaseReportA4 {
+  label BaseReportA4 open
+  xywh {178 95 420 590} type Double resizable
+  class Fl_Window visible
+} {
+  Fl_Box rpt_Logo {
+    label Ourbiz
+    dirty_name rpt_Logo
+    xywh {10 5 105 35} labeltype SHADOW_LABEL labelfont 3 labelsize 30 align 660
+  }
+  Fl_Box rpt_Title {
+    label {Report Title}
+    dirty_name rpt_Title
+    xywh {120 5 295 20} labelfont 1 labelsize 16
+  }
+  Fl_Box rpt_SubTitle {
+    label Date
+    dirty_name rpt_SubTitle
+    xywh {120 30 290 10} labelsize 8 align 24
+  }
+  Fl_Box {} {
+    label Line
+    xywh {10 40 405 1} box FLAT_BOX color 34 labeltype NO_LABEL
+  }
+  Fl_Browser rpt_Body {
+    dirty_name rpt_Body selected
+    xywh {10 45 408 495} labelsize 8 textsize 8 resizable
+    code0 {o->has_scrollbar(FLVS_NONE);}
+    code1 {o->feature_remove(FLVF_ROW_SELECT | FLVF_PERSIST_SELECT);}
+    code2 {o->for_print(true);}
+    class Fl_Data_Table
+  }
+  Fl_Box {} {
+    label Line
+    xywh {10 545 405 1} box FLAT_BOX color 34 labeltype NO_LABEL
+  }
+  Fl_Box rpt_SubFooter {
+    label Page
+    dirty_name rpt_SubFooter
+    xywh {10 547 405 10} labelfont 1 labelsize 8 align 16
+  }
+  Fl_Box rpt_Footer {
+    label {OURBIZ is an excelente application to manage a business.}
+    dirty_name rpt_Footer
+    xywh {10 560 405 19} labelfont 2 labelsize 8 align 145
+  }
+} 
+
+widget_class PrintPreviewGroup {
+  label {Print Preview}
+  xywh {181 165 770 440} type Double labelsize 16 hide resizable position_relative
+} {
+  Fl_Group {} {open
+    xywh {0 0 80 440}
+  } {
+    Fl_Button btnRefresh {
+      label Refresh
+      xywh {0 5 80 25} labelsize 16
+    }
+    Fl_Button btnPrinter {
+      label Printer
+      xywh {0 35 80 25} labelsize 16
+    }
+    Fl_Button btnPrint {
+      label Print
+      xywh {0 65 80 25} labelsize 16
+    }
+    Fl_Check_Button chkOnlyData {
+      label {Only Data}
+      xywh {30 118 20 25} down_box DOWN_BOX labelsize 16 align 1
+    }
+    Fl_Check_Button chkA4 {
+      label A4
+      xywh {30 165 20 25} down_box DOWN_BOX labelsize 16 align 1
+    }
+    Fl_Input iNumCopies {
+      label Copies
+      xywh {10 211 56 24} type Int labelsize 16 align 1 textsize 16
+    }
+    Fl_Browser brwPages {
+      label Pages
+      xywh {5 260 70 180} type Hold labelsize 16 align 1 textsize 16 resizable
+    }
+  }
+  Fl_Scroll PreviewScroll {open
+    xywh {90 0 680 440} box ENGRAVED_FRAME color 7 resizable
+    class OrderPageGroup
+  } {}
+} 
+
+widget_class OrderPageGroup {
+  label InvoiceA4
+  xywh {213 39 630 685} type Double hide resizable
+  class Fl_Scroll position_relative
+} {
+  Fl_Group page {open
+    xywh {0 0 634 686} color 7
+  } {
+    Fl_Group pageDesignGroup {open
+      xywh {2 0 630 686} labeltype NO_LABEL
+    } {
+      Fl_Group logoGroupH {
+        dirty_name logoGroupH open
+        xywh {15 10 316 130} hide
+      } {
+        Fl_Box logoH {
+          label FLTK
+          dirty_name logoH
+          xywh {16 10 310 50} labeltype SHADOW_LABEL labelfont 3 labelsize 40 align 660
+        }
+        Fl_Box companyBoxH {
+          label {FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation.}
+          dirty_name companyBoxH
+          xywh {16 65 308 75} labelfont 2 labelsize 10 align 144
+          class Fl_Box_ClearLabel
+        }
+      }
+      Fl_Group logoGroupV {
+        dirty_name logoGroupV open
+        xywh {15 10 316 130} hide
+      } {
+        Fl_Box logoV {
+          label FLTK
+          dirty_name logoV
+          xywh {16 10 100 130} labeltype SHADOW_LABEL labelfont 3 labelsize 40 align 660
+        }
+        Fl_Box companyBoxV {
+          label {FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation.}
+          dirty_name companyBoxV
+          xywh {120 10 210 130} labelfont 2 labelsize 10 align 144
+          class Fl_Box_ClearLabel
+        }
+      }
+      Fl_Group logoGroupHV {
+        dirty_name logoGroupHV open
+        xywh {15 10 316 130}
+      } {
+        Fl_Box logoHV1 {
+          label FLTK
+          dirty_name logoHV1
+          xywh {16 10 100 130} labeltype SHADOW_LABEL labelfont 3 labelsize 40 align 660
+        }
+        Fl_Box logoHV2 {
+          label FLTK
+          dirty_name logoHV2
+          xywh {120 10 210 50} labeltype SHADOW_LABEL labelfont 3 labelsize 40 align 660
+        }
+        Fl_Box companyBoxHV {
+          label {FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation.}
+          dirty_name companyBoxHV
+          xywh {120 50 210 90} labelfont 2 labelsize 9 align 144
+          class Fl_Box_ClearLabel
+        }
+      }
+      Fl_Group OrderNumber {
+        dirty_name OrderNumber open
+        xywh {336 10 286 40} box FLAT_BOX color 39 labeltype NO_LABEL
+      } {
+        Fl_Box box_header_number_date {
+          xywh {337 11 142 18} box FLAT_BOX color 47 labeltype NO_LABEL labelsize 12
+        }
+        Fl_Box box_data_number_date {
+          xywh {337 30 142 19} box FLAT_BOX color 7 labeltype NO_LABEL labelsize 12
+        }
+        Fl_Box header_date_box {
+          label DATE
+          xywh {480 11 141 18} box FLAT_BOX color 47 labelfont 1 labelsize 12
+        }
+        Fl_Box box_data_date_box {
+          xywh {480 30 141 19} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 12
+        }
+      }
+      Fl_Box box_to {
+        xywh {336 55 286 85} box BORDER_FRAME color 39 labelfont 1 labelsize 16 align 21
+      }
+      Fl_Group orderLines {
+        dirty_name orderLines open
+        xywh {16 148 606 433} box FLAT_BOX color 39 labeltype NO_LABEL resizable
+      } {
+        Fl_Box header_lines_code_box {
+          label CODE
+          xywh {17 149 46 20} box FLAT_BOX color 47 labelfont 1 labelsize 10
+        }
+        Fl_Box header_lines_description_box {
+          label DESCRIPTION
+          xywh {64 149 300 20} box FLAT_BOX color 47 labelfont 1 labelsize 10
+        }
+        Fl_Box header_lines_quantity_box {
+          label {QTY.}
+          xywh {365 149 40 20} box FLAT_BOX color 47 labelfont 1 labelsize 10
+        }
+        Fl_Box header_lines_price_box {
+          label PRICE
+          xywh {406 149 60 20} box FLAT_BOX color 47 labelfont 1 labelsize 10
+        }
+        Fl_Box header_lines_discount_box {
+          label {DISC. %}
+          xywh {467 149 30 20} box FLAT_BOX color 47 labelfont 1 labelsize 8 align 128
+        }
+        Fl_Box header_lines_sales_tax1_box {
+          label {S.T. I %}
+          dirty_name header_lines_sales_tax1_box
+          xywh {498 149 30 20} box FLAT_BOX color 47 labelfont 1 labelsize 8 align 128
+        }
+        Fl_Box header_lines_sales_tax2_box {
+          label {S.T. II %}
+          dirty_name header_lines_sales_tax2_box
+          xywh {529 149 30 20} box FLAT_BOX color 47 labelfont 1 labelsize 8 align 128
+        }
+        Fl_Box header_lines_subtotal_box {
+          label SUBTOTAL
+          xywh {560 149 61 20} box FLAT_BOX color 47 labelfont 1 labelsize 10
+        }
+        Fl_Group designLinesGroup {open
+          xywh {17 170 604 410} labeltype NO_LABEL resizable
+        } {
+          Fl_Box data_lines_code_box {
+            xywh {17 170 46 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+          Fl_Box data_lines_description_box {
+            xywh {64 170 300 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+          Fl_Box data_lines_quantity_box {
+            xywh {365 170 40 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+          Fl_Box data_tlines_price_box {
+            xywh {406 170 60 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+          Fl_Box data_lines_discount_box {
+            xywh {467 170 30 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+          Fl_Box data_lines_sales_tax1_box {
+            dirty_name data_lines_sales_tax1_box
+            xywh {498 170 30 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+          Fl_Box data_lines_sales_tax2_box {
+            dirty_name data_lines_sales_tax2_box
+            xywh {529 170 30 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+          Fl_Box data_lines_subtotal_box {
+            xywh {560 170 61 410} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 10
+          }
+        }
+      }
+      Fl_Group orderTotals {
+        dirty_name orderTotals open
+        xywh {16 585 606 46} box FLAT_BOX color 39 labeltype NO_LABEL
+      } {
+        Fl_Box header_PAGENO_box {
+          label PAGE
+          xywh {17 586 65 20} box FLAT_BOX color 47 labelfont 1 labelsize 12
+        }
+        Fl_Box box_data_pageno_box {
+          xywh {17 607 65 23} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 12
+        }
+        Fl_Box header_totals_subtotal_box {
+          label SUBTOTAL
+          xywh {83 586 150 20} box FLAT_BOX color 47 labelfont 1 labelsize 12
+        }
+        Fl_Box data_totals_subtotal_box {
+          xywh {83 607 150 23} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 12
+        }
+        Fl_Box header_totals_total_sales_tax1_box {
+          label {Sales Tax I}
+          dirty_name header_totals_total_sales_tax1_box
+          xywh {234 586 120 20} box FLAT_BOX color 47 labelfont 1 labelsize 12
+        }
+        Fl_Box data_totals_total_sales_tax1_box {
+          dirty_name data_totals_total_sales_tax1_box
+          xywh {234 607 120 23} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 12
+        }
+        Fl_Box header_totals_total_sales_tax2_box {
+          label {Sales Tax II}
+          dirty_name header_totals_total_sales_tax2_box
+          xywh {355 586 115 20} box FLAT_BOX color 47 labelfont 1 labelsize 12
+        }
+        Fl_Box data_totals_total_sales_tax2_box {
+          dirty_name data_totals_total_sales_tax2_box
+          xywh {355 607 115 23} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 12
+        }
+        Fl_Box header_totals_total_box {
+          label TOTAL
+          xywh {471 586 150 20} box FLAT_BOX color 47 labelfont 1 labelsize 12
+        }
+        Fl_Box data_totals_total_box {
+          xywh {471 607 150 23} box FLAT_BOX color 7 labeltype NO_LABEL labelfont 1 labelsize 12
+        }
+      }
+      Fl_Box notes_box {
+        label {FLTK is provided under the terms of the GNU Library Public License, Version 2 with exceptions that allow for static linking.}
+        xywh {17 638 606 37} labelfont 2 labelsize 9 align 144
+        class Fl_Box_ClearLabel
+      }
+    }
+    Fl_Group printDataGroup {open
+      xywh {3 0 628 637} labeltype NO_LABEL resizable
+    } {
+      Fl_Box orderTypeBox {
+        dirty_name orderTypeBox
+        xywh {338 10 139 20} labelfont 1 labelsize 12
+      }
+      Fl_Box numberBox {
+        xywh {338 33 139 16} labelfont 5 labelsize 15 align 16
+        class Fl_Box_ClearLabel
+      }
+      Fl_Box dateBox {
+        xywh {484 32 133 16} labelfont 5 labelsize 15 align 16
+        class Fl_Box_ClearLabel
+      }
+      Fl_Box entityBox {
+        xywh {338 57 282 82} labelsize 12 align 85
+        class Fl_Box_ClearLabel
+      }
+      Fl_Group dataLinesGroup {open
+        xywh {16 169 605 412} labeltype NO_LABEL align 16 resizable
+      } {
+        Fl_Box codeBox {
+          xywh {16 174 46 404} labelsize 11 align 25
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box descriptionBox {
+          xywh {64 174 300 404} labelsize 11 align 85
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box quantityBox {
+          xywh {365 174 40 404} labelsize 11 align 25
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box priceBox {
+          xywh {406 174 60 404} labelsize 11 align 25
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box discountBox {
+          xywh {467 174 30 404} labelsize 11 align 25
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box sales_tax1Box {
+          dirty_name sales_tax1Box
+          xywh {498 174 30 404} labelsize 11 align 25
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box sales_tax2Box {
+          dirty_name sales_tax2Box
+          xywh {529 174 30 404} labelsize 11 align 25
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box lineTotalBox {
+          xywh {560 174 61 404} labelsize 11 align 25
+          class Fl_Box_ClearLabel
+        }
+      }
+      Fl_Group bottomTotals {
+        dirty_name bottomTotals open
+        xywh {16 585 605 48} labeltype NO_LABEL
+      } {
+        Fl_Box orderPageBox {
+          dirty_name orderPageBox
+          xywh {16 608 65 25} labelfont 5 labelsize 15
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box fisrtTotalBox {
+          xywh {83 608 150 25} labelfont 5 labelsize 15
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box sales_tax1AmountBox {
+          dirty_name sales_tax1AmountBox
+          xywh {234 608 120 25} labelfont 5 labelsize 15
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box sales_tax2AmountBox {
+          dirty_name sales_tax2AmountBox
+          xywh {355 608 115 25} labelfont 5 labelsize 15
+          class Fl_Box_ClearLabel
+        }
+        Fl_Box totalBox {
+          xywh {500 608 121 25} labelfont 5 labelsize 15
+          class Fl_Box_ClearLabel
+        }
+      }
+    }
+  }
+} 
+
+widget_class ProductPricesGroup {
+  label {Product Prices by Quantity}
+  xywh {48 153 760 220} type Double labelsize 16 hide position_relative
+} {
+  Fl_Browser grid {
+    label {Prices by Quantity}
+    dirty_name grid
+    xywh {5 5 750 155} labelsize 16 align 1 textsize 16
+    class Fl_Data_Table
+  }
+  Fl_Input db_product_prices_quantity {
+    label Quantity
+    dirty_name db_product_prices_quantity
+    xywh {5 185 100 25} type Float labelsize 16 align 5 textsize 16
+    code0 {o->decimal_places(-6);}
+  }
+  Fl_Input db_product_prices_markup_pct {
+    label {Markup %}
+    dirty_name db_product_prices_markup_pct
+    xywh {115 185 108 25} type Float labelsize 16 align 5 textsize 16
+    code0 {//o->decimal_places(-6);}
+  }
+  Fl_Input db_product_prices_discount_pct {
+    label {Discount %}
+    dirty_name db_product_prices_discount_pct
+    xywh {233 185 108 25} type Float labelsize 16 align 5 textsize 16
+    code0 {//o->decimal_places(-6);}
+  }
+  Fl_Input db_product_prices_price {
+    label Price
+    dirty_name db_product_prices_price
+    xywh {351 185 108 25} type Float labelsize 16 align 5 textsize 16
+  }
+  Fl_Button btnDbAction {
+    label Save
+    dirty_name btnDbAction
+    xywh {469 185 105 25} labelsize 16
+  }
+  Fl_Choice dbAction {
+    label Action
+    dirty_name dbAction open
+    xywh {590 185 105 25} down_box BORDER_BOX labelsize 16 align 1 textsize 16
+    class Fl_Choice_dbAction
+  } {}
+} 
+
+widget_class ProductKitGroup {
+  label ProductKitGroup
+  xywh {24 106 775 470} type Double labelsize 16 hide resizable position_relative
+} {
+  Fl_Browser grid {
+    dirty_name grid
+    xywh {4 1 770 328} labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group kit_group_search_edit {
+    label {Search / Edit} open
+    xywh {0 355 540 115} box UP_BOX color 166 labelsize 16
+  } {
+    Fl_Group grpSearchEdit {
+      dirty_name grpSearchEdit open
+      xywh {10 365 525 93}
+    } {
+      Fl_Input db_product_kits_product_id {
+        label Code
+        dirty_name db_product_kits_product_id
+        xywh {12 382 87 25} type Int labelsize 16 align 5 textsize 16
+      }
+      Fl_Input db_product_kits_sell_description {
+        label Description
+        dirty_name db_product_kits_sell_description
+        xywh {109 382 426 25} labelsize 16 align 5 textsize 16
+      }
+      Fl_Button btnSearchProduct {
+        label Search
+        xywh {445 433 90 25} labelsize 16
+      }
+      Fl_Input db_product_kits_quantity {
+        label Quantity
+        dirty_name db_product_kits_quantity
+        xywh {10 433 89 25} type Float labelsize 16 align 5 textsize 16
+      }
+      Fl_Input db_product_kits_product_price {
+        label Price
+        dirty_name db_product_kits_product_price
+        xywh {109 433 108 25} type Float labelsize 16 align 5 textsize 16
+      }
+      Fl_Button btnDbAction {
+        label Save
+        dirty_name btnDbAction
+        xywh {225 433 100 25} labelsize 16
+      }
+      Fl_Choice dbAction {
+        label Action
+        dirty_name dbAction open
+        xywh {335 433 100 25} down_box BORDER_BOX labelsize 16 align 1 textsize 16
+        class Fl_Choice_dbAction
+      } {}
+    }
+    Fl_Check_Button btnKitPartOf {
+      label {Part of}
+      dirty_name btnKitPartOf
+      xywh {430 360 100 25} down_box DOWN_BOX labelsize 16
+    }
+  }
+  Fl_Group kit_group_totals {
+    label Totals open
+    xywh {544 355 230 115} box UP_BOX color 166 labelsize 16
+  } {
+    Fl_Input kit_sales_price {
+      label Price
+      dirty_name kit_sales_price
+      xywh {664 433 100 25} type Float labelsize 16 align 5 textsize 16
+    }
+    Fl_Input kit_prices_sum {
+      label {Prices Sum}
+      xywh {664 380 100 25} type Float labelsize 16 align 5 textsize 16
+    }
+    Fl_Input kit_parts {
+      label Parts
+      xywh {554 380 100 25} type Int labelsize 16 align 5 textsize 16
+    }
+    Fl_Input kit_markup {
+      label {Markup %}
+      dirty_name kit_markup
+      xywh {554 433 100 25} type Float labelsize 16 align 5 textsize 16
+    }
+  }
+} 
+
+widget_class AskLoginWindow {
+  label {Server Login}
+  xywh {246 157 500 120} type Double labelsize 16 hide hotspot
+  class Fl_Double_Window
+} {
+  Fl_Input host {
+    label Host
+    dirty_name host
+    xywh {10 30 405 25} labelsize 16 align 5 textsize 16
+    code0 {o->value("localhost");}
+  }
+  Fl_Input port {
+    label Port
+    dirty_name port
+    xywh {425 30 65 25} type Int labelsize 16 align 5 textsize 16
+    code0 {o->value("8888");}
+  }
+  Fl_Input user {
+    label User
+    dirty_name user
+    xywh {10 85 170 25} labelsize 16 align 5 textsize 16
+  }
+  Fl_Input password {
+    label Password
+    dirty_name password
+    xywh {200 85 170 25} type Secret labelsize 16 align 5 textsize 16
+  }
+  Fl_Return_Button btnConnect {
+    label Connect
+    dirty_name btnConnect
+    xywh {385 85 106 25}
+  }
+} 
+
+widget_class AppUsersEditWindow {
+  label {App Users List / Edit}
+  xywh {282 148 500 500} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 490 140} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 148 489 347} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_app_users_id {
+      label ID
+      macro_name {db app_users id}
+      xywh {15 173 82 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_app_users_cdate {
+      label CDate
+      macro_name {db app_users cdate}
+      xywh {115 173 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_app_users_mdate {
+      label MDate
+      macro_name {db app_users mdate}
+      xywh {255 173 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_app_users_is_active {
+      label Active
+      macro_name {db app_users is_active}
+      xywh {385 175 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_app_users_user_name {
+      label UserName
+      macro_name {db app_users user_name}
+      xywh {15 225 140 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_app_users_password1 {
+      label Password
+      macro_name {db app_users password1}
+      xywh {180 225 140 25} type Secret labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_app_users_password2 {
+      label {Repite Password}
+      macro_name {db app_users password2}
+      xywh {345 225 140 25} type Secret labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_app_users_name {
+      label Name
+      macro_name {db app_users name}
+      xywh {15 275 470 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {380 428 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {380 463 105 25} labelsize 16
+    }
+    Fl_Text_Editor db_app_users_rights {
+      label Rights
+      macro_name {db app_users rights}
+      xywh {15 325 470 55} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class Fl_Text_Editor_Buffered
+    }
+    Fl_Text_Editor db_app_users_notes {
+      label Notes
+      macro_name {db app_users notes}
+      xywh {15 398 360 90} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class Fl_Text_Editor_Buffered
+    }
+    Fl_Check_Button {} {
+      label {Wrap lines}
+      xywh {380 398 105 25} down_box DOWN_BOX value 1 labelsize 16
+    }
+  }
+} 
+
+widget_class AppConfigEditWindow {
+  label {Application Configuration List / Edit}
+  xywh {346 83 500 490} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 490 200} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 215 490 269} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_config_id {
+      label ID
+      macro_name {db config id}
+      xywh {15 240 82 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_config_cdate {
+      label CDate
+      macro_name {db config cdate}
+      xywh {115 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_config_mdate {
+      label MDate
+      macro_name {db config mdate}
+      xywh {255 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_config_is_active {
+      label Active
+      macro_name {db config is_active}
+      xywh {385 242 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_config_key {
+      label Key
+      macro_name {db config key}
+      xywh {15 292 350 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_config_value {
+      label Value
+      macro_name {db config value}
+      xywh {15 345 350 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {380 310 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {380 345 105 25} labelsize 16
+    }
+    Fl_Input db_config_notes {
+      label Notes
+      macro_name {db config notes}
+      xywh {15 398 470 76} type Multiline labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+  }
+} 
+
+widget_class TanslationsWindow {
+  label Translations
+  xywh {217 76 490 560} type Double hide
+  class Edit_Base_Window
+} {
+  Fl_Tabs myTabs {
+    dirty_name myTabs open
+    xywh {5 10 482 505} labelsize 16
+  } {
+    Fl_Group tabLanguages {
+      label Languages
+      dirty_name tabLanguages open
+      xywh {5 40 480 475} labelsize 16 hide
+    } {
+      Fl_Browser grid_languages {
+        dirty_name grid_languages
+        xywh {21 55 456 215} labelsize 16 textsize 16
+        class Fl_Data_Table
+      }
+      Fl_Input db_languages_lang {
+        label Code
+        dirty_name db_languages_lang
+        xywh {20 295 75 25} labelsize 16 align 5 textsize 16
+      }
+      Fl_Input db_languages_date_format {
+        label {Date format}
+        dirty_name db_languages_date_format
+        xywh {366 295 110 25} labelsize 16 align 5 textsize 16
+      }
+      Fl_Input db_languages_name {
+        label Name
+        dirty_name db_languages_name
+        xywh {20 345 456 25} labelsize 16 align 5 textsize 16
+      }
+      Fl_Input db_languages_native_name {
+        label {Native Name}
+        dirty_name db_languages_native_name
+        xywh {20 395 456 25} labelsize 16 align 5 textsize 16
+      }
+      Fl_Input db_languages_decimal_sep {
+        label {Separators -> Decimal}
+        dirty_name db_languages_decimal_sep
+        xywh {205 430 35 40} labelsize 16 textsize 40
+      }
+      Fl_Input db_languages_thousand_sep {
+        label Thousand
+        dirty_name db_languages_thousand_sep
+        xywh {345 430 35 40} labelsize 16 textsize 40
+      }
+    }
+    Fl_Group tabTranslations {
+      label Translations
+      dirty_name tabTranslations open
+      xywh {5 40 480 475} labelsize 16
+    } {
+      Fl_Browser grid_translations {
+        dirty_name grid_translations
+        xywh {16 55 461 180} labelsize 16 textsize 16
+        class Fl_Data_Table
+      }
+      Fl_Choice db_translations_language {
+        label Language
+        dirty_name db_translations_language open
+        xywh {16 260 461 30} down_box BORDER_BOX labelsize 16 align 5 textsize 16
+        class Fl_Choice_Int
+      } {}
+      Fl_Input db_translations_values_svalue {
+        label Content
+        dirty_name db_translations_values_svalue
+        xywh {16 315 461 160} type Multiline labelsize 16 align 5 textsize 16
+      }
+      Fl_Button btnTransSearch {
+        label {Sea&rch}
+        dirty_name btnTransSearch
+        xywh {301 480 80 25} labelsize 16
+      }
+      Fl_Button btnTransClear {
+        label {Cl&ear}
+        callback {db_translations_values_svalue->value("");}
+        dirty_name btnTransClear
+        xywh {396 480 80 25} labelsize 16
+      }
+    }
+  }
+  Fl_Choice dbAction {
+    dirty_name dbAction open
+    xywh {26 525 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+    class Fl_Choice_dbAction
+  } {}
+  Fl_Button btnDbAction {
+    label Action
+    dirty_name btnDbAction
+    xywh {151 525 105 25} labelsize 16
+  }
+} 
+
+widget_class PaymentTypesEditWindow {
+  label {Payment Types List / Edit}
+  xywh {302 168 500 500} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 490 140} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 148 489 347} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_payment_types_id {
+      label ID
+      macro_name {db payment_types id}
+      dirty_name db_payment_types_id
+      xywh {15 173 82 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_payment_types_cdate {
+      label CDate
+      macro_name {db payment_types cdate}
+      dirty_name db_payment_types_cdate
+      xywh {115 173 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_payment_types_mdate {
+      label MDate
+      macro_name {db payment_types mdate}
+      dirty_name db_payment_types_mdate
+      xywh {255 173 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_payment_types_is_active {
+      label Active
+      macro_name {db payment_types is_active}
+      dirty_name db_payment_types_is_active
+      xywh {385 175 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_payment_types_code {
+      label Code
+      macro_name {db payment_types code}
+      dirty_name db_payment_types_code
+      xywh {15 225 82 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_payment_types_description {
+      label Description
+      macro_name {db payment_types description}
+      dirty_name db_payment_types_description
+      xywh {105 225 380 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input npayments {
+      label {\# Payments}
+      dirty_name npayments
+      xywh {380 275 105 25} type Int labelsize 16 align 5 textsize 16
+    }
+    Fl_Choice payment_periodes {
+      label Periodes
+      dirty_name payment_periodes open
+      xywh {380 320 105 25} down_box BORDER_BOX labelsize 16 align 5 textsize 16
+    } {}
+    Fl_Button btnGenerateTerms {
+      label Generate
+      dirty_name btnGenerateTerms
+      xywh {380 355 105 25} labelsize 16
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {380 428 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {380 463 105 25} labelsize 16
+    }
+    Fl_Text_Editor db_payment_types_payment_terms {
+      label {Terms (\#  %  after  periode)}
+      macro_name {db payment_types payment_terms}
+      xywh {15 275 360 105} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class Fl_Text_Editor_Buffered
+    }
+    Fl_Text_Editor db_payment_types_notes {
+      label Notes
+      macro_name {db payment_types notes}
+      dirty_name db_payment_types_notes
+      xywh {15 398 360 90} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class Fl_Text_Editor_Buffered
+    }
+    Fl_Check_Button {} {
+      label {Wrap lines}
+      xywh {380 398 105 25} down_box DOWN_BOX value 1 labelsize 16
+    }
+  }
+} 
+
+widget_class WarrantyTypesEditWindow {
+  label {Warranty Types List / Edit}
+  xywh {219 105 500 385} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 490 200} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 215 490 165} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_warranty_types_id {
+      label ID
+      macro_name {db warranty_types id}
+      dirty_name db_measure_units_id
+      xywh {15 240 82 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_warranty_types_cdate {
+      label CDate
+      macro_name {db warranty_types cdate}
+      dirty_name db_measure_units_cdate
+      xywh {115 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_warranty_types_mdate {
+      label MDate
+      macro_name {db warranty_types mdate}
+      dirty_name db_measure_units_mdate
+      xywh {255 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_warranty_types_code {
+      label Code
+      macro_name {db warranty_types code}
+      dirty_name db_measure_units_code
+      xywh {15 295 82 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_warranty_types_is_active {
+      label Active
+      macro_name {db warranty_types is_active}
+      dirty_name db_measure_units_is_active
+      xywh {385 242 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_warranty_types_description {
+      label Description
+      macro_name {db warranty_types description}
+      dirty_name db_measure_units_description
+      xywh {15 345 360 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {380 310 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {380 345 105 25} labelsize 16
+    }
+  }
+} 
+
+widget_class MeasureUnitsEditWindow {
+  label {Measure Units List / Edit}
+  xywh {286 134 500 385} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 490 200} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 215 490 165} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_measure_units_id {
+      label ID
+      macro_name {db measure_units id}
+      dirty_name db_measure_units_id
+      xywh {15 240 82 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_measure_units_cdate {
+      label CDate
+      macro_name {db measure_units cdate}
+      dirty_name db_measure_units_cdate
+      xywh {115 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_measure_units_mdate {
+      label MDate
+      macro_name {db measure_units mdate}
+      dirty_name db_measure_units_mdate
+      xywh {255 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_measure_units_code {
+      label Code
+      macro_name {db measure_units code}
+      dirty_name db_measure_units_code
+      xywh {15 295 82 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_measure_units_is_active {
+      label Active
+      macro_name {db measure_units is_active}
+      dirty_name db_measure_units_is_active
+      xywh {385 242 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_measure_units_description {
+      label Description
+      macro_name {db measure_units description}
+      dirty_name db_measure_units_description
+      xywh {15 345 360 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {380 310 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {380 345 105 25} labelsize 16
+    }
+  }
+} 
+
+widget_class SalesTaxRatesEditWindow {
+  label {Sales Tax Rates List / Edit}
+  xywh {266 87 500 385} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    tooltip {List of available sales tax} xywh {5 5 490 200} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 215 490 165} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_sales_tax_rates_id {
+      label ID
+      macro_name {db sales_tax_rates id}
+      tooltip {The unique identifier} xywh {15 240 82 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_sales_tax_rates_cdate {
+      label CDate
+      macro_name {db sales_tax_rates cdate}
+      tooltip {The creation date} xywh {115 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_sales_tax_rates_mdate {
+      label MDate
+      macro_name {db sales_tax_rates mdate}
+      tooltip {The modification date} xywh {255 240 120 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_sales_tax_rates_rate1 {
+      label {V.A.T. %}
+      macro_name {db sales_tax_rates rate1}
+      dirty_name db_sales_tax_rates_rate1
+      tooltip {Main sales tax percentage} xywh {15 295 82 25} type Float labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_sales_tax_rates_rate2 {
+      label {R.E. %}
+      macro_name {db sales_tax_rates rate2}
+      dirty_name db_sales_tax_rates_rate2
+      tooltip {Secondary sales tax percentage} xywh {115 295 82 25} type Float labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_sales_tax_rates_is_active {
+      label Active
+      macro_name {db sales_tax_rates is_active}
+      dirty_name db_sales_tax_rates_is_active
+      tooltip {We can deactivate instead of delete it} xywh {255 294 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_sales_tax_rates_description {
+      label Description
+      macro_name {db sales_tax_rates description}
+      dirty_name db_sales_tax_rates_description
+      tooltip {A friendly description to identify this tax} xywh {15 345 350 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {380 310 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {380 345 105 25} labelsize 16
+    }
+  }
+} 
+
+widget_class OrderTypesEditWindow {
+  label {Order Types List / Edit}
+  xywh {100 110 800 535} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 790 200} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 210 790 320} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Input db_order_types_code {
+      label Code
+      macro_name {db order_types code}
+      dirty_name db_order_types_code
+      xywh {103 233 82 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_description_to_print {
+      label {Description to print}
+      macro_name {db order_types description_to_print}
+      dirty_name db_order_types_description_to_print
+      xywh {195 233 225 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_series {
+      label Series
+      macro_name {db order_types series}
+      dirty_name db_order_types_series
+      xywh {430 233 82 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_numbering {
+      label Number
+      macro_name {db order_types numbering}
+      dirty_name db_order_types_numbering
+      xywh {522 233 98 25} type Int labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_group_order {
+      label {Grp 1}
+      macro_name {db order_types group_order}
+      dirty_name db_order_types_group_order
+      xywh {630 233 70 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_subgroup_order {
+      label {Grp 2}
+      macro_name {db order_types subgroup_order}
+      dirty_name db_order_types_subgroup_order
+      xywh {710 233 75 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Pack pack {open
+      xywh {15 266 770 29} type HORIZONTAL labelsize 16
+      code0 {o->with_label(1);}
+      code1 {o->spacing(10);}
+    } {
+      Fl_Check_Button db_order_types_is_active {
+        label Active
+        macro_name {db order_types is_active}
+        dirty_name db_order_types_is_active
+        xywh {20 270 78 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_order_types_with_sales_tax {
+        label {With V.A.T.}
+        macro_name {db order_types with_sales_tax}
+        dirty_name db_order_types_with_sales_tax
+        xywh {100 270 100 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_order_types_with_sales_tax_included {
+        label {V.A.T. Included}
+        macro_name {db order_types with_sales_tax_included}
+        dirty_name db_order_types_with_sales_tax_included
+        xywh {220 270 100 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_order_types_show_sales_tax {
+        label {Show V.A.T.}
+        macro_name {db order_types show_sales_tax}
+        dirty_name db_order_types_show_sales_tax
+        xywh {365 270 100 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_order_types_show_prices {
+        label {Show prices}
+        macro_name {db order_types show_prices}
+        dirty_name db_order_types_show_prices
+        xywh {490 270 100 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+    }
+    Fl_Input db_order_types_description {
+      label Description
+      macro_name {db order_types description}
+      dirty_name db_order_types_description
+      xywh {15 315 385 25} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_with_payment {
+      label Payment
+      macro_name {db order_types with_payment}
+      xywh {425 435 30 25} labelsize 16 align 8 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_with_inventory {
+      label Inventory
+      macro_name {db order_types with_inventory}
+      xywh {425 375 30 25} labelsize 16 align 8 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_with_order {
+      label Order
+      macro_name {db order_types with_order}
+      xywh {425 345 30 25} labelsize 16 align 8 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_with_credit {
+      label Credit
+      macro_name {db order_types with_credit}
+      xywh {425 465 30 25} labelsize 16 align 8 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_order_types_is_incoming {
+      label Income
+      macro_name {db order_types is_incoming}
+      dirty_name db_order_types_is_incoming
+      xywh {655 350 125 25} type Radio down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_order_types_is_expense {
+      label Expense
+      macro_name {db order_types is_expense}
+      dirty_name db_order_types_is_expense
+      xywh {655 315 125 25} type Radio down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {679 385 106 28} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {681 424 104 28} labelsize 16
+    }
+    Fl_Input db_order_types_notes {
+      label Notes
+      macro_name {db order_types notes}
+      dirty_name db_order_types_notes
+      xywh {15 362 385 158} type Multiline labelsize 16 align 5 when 8 textsize 16 resizable
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Output db_order_types_id {
+      label ID
+      macro_name {db order_types id}
+      dirty_name db_order_types_id
+      xywh {15 233 78 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_with_quote {
+      label Quote
+      macro_name {db order_types with_quote}
+      xywh {425 315 30 25} labelsize 16 align 8 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_with_invoice {
+      label Invoice
+      macro_name {db order_types with_invoice}
+      xywh {425 405 30 25} labelsize 16 align 8 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_order_types_with_lost {
+      label Lost
+      macro_name {db order_types with_lost}
+      xywh {425 495 30 25} labelsize 16 align 8 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+  }
+} 
+
+widget_class ImageWindow {
+  label Image
+  xywh {325 355 305 260} type Double color 7 labelsize 16 hide resizable
+  class Base_Window
+} {
+  Fl_Button btnImage {
+    xywh {0 0 305 263} box NO_BOX resizable
+    class Fl_Image_Box
+  }
+} 
+
+widget_class DynamicQueryWindow {
+  label {Dynamic Data}
+  xywh {285 319 700 400} type Double hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    dirty_name grid
+    xywh {5 5 690 390} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+} 
+
+widget_class ImagesListEditWindow {
+  label {Images List / Edit}
+  xywh {81 129 800 560} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 790 295} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 305 790 250} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Group {} {open
+      xywh {15 315 435 232}
+    } {
+      Fl_Output db_images_id {
+        label ID
+        macro_name {db images id}
+        dirty_name db_images_id
+        xywh {15 328 78 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_images_name {
+        label Name
+        macro_name {db images name}
+        dirty_name db_images_name
+        xywh {103 328 347 25} labelsize 16 align 5 textfont 1 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_images_group_set {
+        label Group
+        macro_name {db images group_set}
+        dirty_name db_images_group_set
+        xywh {15 380 80 25} type Int labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Output db_images_mime_type {
+        label Type
+        macro_name {db images mime_type}
+        dirty_name db_images_mime_type
+        xywh {105 380 115 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Output db_images_mdate {
+        label {Update Date}
+        macro_name {db images mdate}
+        dirty_name db_images_mdate
+        xywh {225 380 110 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Output db_images_cdate {
+        label {Create Date}
+        macro_name {db images cdate}
+        dirty_name db_images_cdate
+        xywh {338 380 110 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnSearch {
+        label Search
+        xywh {345 455 104 25} labelsize 16
+      }
+      Fl_Choice dbAction {
+        dirty_name dbAction open
+        xywh {343 487 106 28} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+        class Fl_Choice_dbAction
+      } {}
+      Fl_Button btnDbAction {
+        label Action
+        dirty_name btnDbAction
+        xywh {345 519 104 28} labelsize 16
+      }
+      Fl_Input db_images_description {
+        label Notes
+        macro_name {db images description}
+        dirty_name db_images_description
+        xywh {15 430 320 115} type Multiline labelsize 16 align 5 when 8 textsize 16 resizable
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input query_limit {
+        label Limit
+        xywh {385 425 60 25} type Int labelsize 16 textsize 16
+        code0 {o->value("50");}
+      }
+      Fl_Box img_size {
+        label Size
+        dirty_name img_size
+        xywh {225 405 109 25} labelsize 16
+      }
+    }
+    Fl_Button btnImage {
+      xywh {485 315 300 232} box ENGRAVED_FRAME align 80 resizable
+      class Fl_Image_Box
+    }
+  }
+} 
+
+widget_class GroupsListEditWindow {
+  label {Groups List / Edit}
+  xywh {328 91 800 560} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Tree tree {
+    dirty_name tree
+    xywh {10 10 780 360} labeltype NO_LABEL labelsize 16 resizable
+    code0 {//o->showroot(0);}
+    code1 {//o->select_focus(1);}
+    class MyTree_Browser
+  }
+  Fl_Group bottomGroup {open
+    xywh {0 375 800 185} box ENGRAVED_BOX color 246 labelsize 16
+  } {
+    Fl_Input db_group_description {
+      label Description
+      macro_name {db group description}
+      xywh {98 408 576 28} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_group_parent_id {
+      label Parent
+      macro_name {db group parent_id}
+      xywh {684 408 106 28} type Int labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {684 484 106 28} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {686 522 104 28} labelsize 16
+    }
+    Fl_Output db_group_id {
+      label ID
+      macro_name {db group id}
+      xywh {10 408 78 28} labelsize 16 align 5 textfont 1 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button btnWrapNotes {
+      label {Wrap lines}
+      dirty_name btnWrapNotes
+      xywh {95 440 115 25} down_box DOWN_BOX value 1 labelsize 16
+    }
+    Fl_Text_Editor db_group_notes {
+      label Notes
+      macro_name {db group notes}
+      xywh {10 462 660 88} labelsize 16 align 5 textsize 16 resizable
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class MyFl_Text_Editor
+    }
+  }
+} 
+
+widget_class OrdersSumWindow {
+  label {Orders Sum}
+  xywh {92 155 800 560} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid_orders_sum {
+    label {@2 Orders Sum @2}
+    dirty_name grid_orders_sum
+    xywh {5 4 790 202} type Multi box ENGRAVED_BOX color 175 labelsize 16 align 17 textsize 16
+    class Fl_Data_Table
+  }
+  Fl_Group bottomGroup {open
+    xywh {5 210 790 35} box ENGRAVED_BOX color 246 labelsize 16
+  } {
+    Fl_Input query_limit {
+      dirty_name query_limit
+      tooltip {Limit the amount of records to show} xywh {15 216 40 24} type Int labeltype NO_LABEL labelsize 16 textsize 16
+      code0 {o->value("50");}
+    }
+    Fl_Input search_str {
+      xywh {65 215 375 25} labeltype NO_LABEL labelsize 16 when 8 textsize 16 resizable
+    }
+    Fl_Button btnSearch {
+      label Search
+      xywh {455 215 100 25} labelsize 16
+    }
+    Fl_Button btnDelete {
+      label Delete
+      dirty_name btnDelete
+      xywh {689 215 100 25} labelsize 16
+    }
+    Fl_Button btnCreate {
+      label Create
+      dirty_name btnCreate
+      xywh {574 215 100 25} labelsize 16
+    }
+  }
+  Fl_Group {} {open
+    xywh {5 255 790 300} resizable
+  } {
+    Fl_Choice orders_sum_detail_type {
+      dirty_name orders_sum_detail_type open
+      xywh {5 255 790 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+    } {}
+    Fl_Browser grid_orders_sum_details {
+      label {@2 Ordes Sum Details @2}
+      dirty_name grid_orders_sum_details
+      xywh {5 288 790 267} type Multi box ENGRAVED_BOX color 175 labelsize 16 align 17 textsize 16 resizable
+      class Fl_Data_Table
+    }
+  }
+} 
+
+widget_class PaymentEditWindow {
+  label {Payment Edit}
+  xywh {147 111 720 430} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Output db_payments_id {
+    label {Payment \#}
+    macro_name {db payments id}
+    xywh {85 5 100 25} labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Button btnOrderId {
+    label {@<->}
+    dirty_name btnOrderId
+    tooltip {Show Associated order if any [order_id].} xywh {190 5 30 25} labelsize 18 labelcolor 22
+  }
+  Fl_Input db_payments_amount {
+    label Amount
+    macro_name {db payments amount}
+    xywh {330 5 110 25} type Float labelsize 16 textfont 1 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Input db_payments_due_date {
+    label {Due Date}
+    macro_name {db payments due_date}
+    xywh {585 5 125 25} labelsize 16 textfont 1 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Input db_payments_entity_name {
+    label Entity
+    macro_name {db payments entity_name}
+    xywh {10 50 570 25} labelsize 16 align 5 textfont 1 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Input db_payments_cdate {
+    label Created
+    macro_name {db payments cdate}
+    xywh {585 50 125 25} labelsize 16 align 5 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Input db_payments_notes {
+    label Notes
+    macro_name {db payments notes}
+    xywh {10 95 535 25} labelsize 16 align 5 textsize 16 resizable
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Button btnShowClearedCalendar {
+    label {@<->}
+    dirty_name btnShowClearedCalendar
+    tooltip {Show calendar} xywh {550 95 30 25} labelsize 18 labelcolor 22
+  }
+  Fl_Input db_payments_cleared_date {
+    label Cleared
+    macro_name {db payments cleared_date}
+    xywh {585 95 125 25} labelsize 16 align 5 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Group group_lines {
+    dirty_name group_lines open
+    xywh {10 126 700 264} box THIN_UP_BOX color 246 labeltype NO_LABEL labelsize 16
+  } {
+    Fl_Browser grid_lines {
+      dirty_name grid_lines
+      xywh {15 135 690 146} type Hold labeltype NO_LABEL labelsize 16 align 5 textsize 16 resizable
+      class Fl_Data_Table
+    }
+    Fl_Group group_edit_line {
+      dirty_name group_edit_line open
+      xywh {15 288 695 102} labeltype NO_LABEL
+    } {
+      Fl_Input db_payments_lines_amount {
+        label Amount
+        macro_name {db payments_lines amount}
+        xywh {15 360 125 25} type Float labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnSaveLine {
+        label {Save Line}
+        dirty_name btnSaveLine
+        xywh {340 360 110 25} labelsize 16
+      }
+      Fl_Input db_payments_lines_notes {
+        label Description
+        macro_name {db payments_lines notes}
+        xywh {15 310 690 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_payments_lines_payment_date {
+        label Date
+        macro_name {db payments_lines payment_date}
+        xywh {155 359 125 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnPaymentDateCalendar {
+        label {@<->}
+        dirty_name btnPaymentDateCalendar
+        tooltip {Show calendar} xywh {285 360 30 25} labelsize 18 labelcolor 22
+      }
+    }
+  }
+  Fl_Button btnSave {
+    label Save
+    dirty_name btnSave
+    xywh {495 400 105 25} labelsize 16
+  }
+  Fl_Button btnPrint {
+    label Print
+    dirty_name btnPrint
+    xywh {605 400 105 25} labelsize 16
+  }
+} 
+
+widget_class GLGroupsListEditWindow {
+  label {GL Groups List / Edit}
+  xywh {480 215 500 352} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Browser grid {
+    xywh {5 5 490 200} type Multi labeltype NO_LABEL labelsize 16 textsize 16 resizable
+    class Fl_Data_Table
+  }
+  Fl_Group editGroup {open
+    xywh {5 215 490 130} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_gl_groups_id {
+      label ID
+      macro_name {db gl_groups id}
+      xywh {15 240 82 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_gl_groups_code {
+      label Code
+      macro_name {db gl_groups code}
+      xywh {110 240 80 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_gl_groups_debit_op {
+      label {Op. Debit (+/-)}
+      macro_name {db gl_groups debit_op}
+      xywh {250 240 30 25} labelsize 16 align 1 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_gl_groups_credit_op {
+      label {Op.Credit (+/-)}
+      macro_name {db gl_groups credit_op}
+      xywh {380 240 30 25} labelsize 16 align 1 textfont 1 textsize 24
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_gl_groups_description {
+      label Description
+      macro_name {db gl_groups description}
+      xywh {15 310 350 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {380 275 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {380 310 105 25} labelsize 16
+    }
+  }
+} 
+
+widget_class GLChartEditWindow {
+  label {Accounts Chart Edit}
+  xywh {253 173 600 350} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Group editGroup {open
+    xywh {5 5 590 340} box ENGRAVED_BOX color 246 labelsize 16 align 8
+  } {
+    Fl_Output db_gl_chart_id {
+      label ID
+      macro_name {db gl_chart id}
+      xywh {15 30 130 26} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_gl_chart_budget {
+      label Budget
+      macro_name {db gl_chart budget}
+      xywh {155 30 150 25} type Float labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_gl_chart_is_active {
+      label Active
+      macro_name {db gl_chart is_active}
+      xywh {480 22 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Check_Button db_gl_chart_is_header {
+      label Header
+      macro_name {db gl_chart is_header}
+      xywh {480 52 100 23} down_box DOWN_BOX labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Input db_gl_chart_group_code {
+      label Code
+      macro_name {db gl_chart group_code}
+      xywh {15 85 130 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice db_gl_chart_gl_group_id {
+      label Group
+      macro_name {db gl_chart gl_group_id} open
+      xywh {155 85 310 25} down_box BORDER_BOX labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class Fl_Choice_Int
+    } {}
+    Fl_Input db_gl_chart_description {
+      label Description
+      macro_name {db gl_chart description}
+      xywh {15 135 450 25} labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Choice dbAction {
+      dirty_name dbAction open
+      xywh {480 105 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+      class Fl_Choice_dbAction
+    } {}
+    Fl_Button btnDbAction {
+      label Action
+      dirty_name btnDbAction
+      xywh {480 135 105 25} labelsize 16
+    }
+    Fl_Text_Editor db_gl_chart_notes {
+      label Notes
+      macro_name {db gl_chart notes}
+      xywh {15 190 570 150} labelsize 16 align 5 textsize 16 resizable
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class Fl_Text_Editor_Buffered
+    }
+    Fl_Check_Button {} {
+      label {Wrap lines}
+      callback {db_gl_chart_notes->wrap_mode(o->value(), 0);}
+      xywh {105 165 105 25} down_box DOWN_BOX value 1 labelsize 16 align 16
+    }
+    Fl_Input db_gl_chart_balance {
+      label Balance
+      macro_name {db gl_chart balance}
+      xywh {315 30 150 25} type Float labelsize 16 align 5 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+  }
+} 
+
+widget_class GLTransactionEditWindow {
+  label {GL Transaction Edit}
+  xywh {80 133 720 410} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Input db_gl_transactions_description {
+    label Description
+    macro_name {db gl_transactions description}
+    xywh {10 24 570 25} labelsize 16 align 5 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Button btnOrderId {
+    label {@<->}
+    dirty_name btnOrderId
+    tooltip {Show Associated order if any [order_id].} xywh {550 0 30 25} labelsize 18 labelcolor 22
+  }
+  Fl_Input db_gl_transactions_transaction_date {
+    label Date
+    macro_name {db gl_transactions transaction_date}
+    xywh {590 25 125 25} labelsize 16 align 5 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Button btnShowCalendar {
+    label {@<->}
+    tooltip {Show calendar} xywh {680 0 30 25} labelsize 18 labelcolor 22
+  }
+  Fl_Group group_lines {
+    dirty_name group_lines open
+    xywh {10 55 705 309} box THIN_UP_BOX color 246 labeltype NO_LABEL labelsize 16
+  } {
+    Fl_Browser grid_lines {
+      dirty_name {@grid_lines}
+      xywh {15 55 695 150} type Hold labeltype NO_LABEL labelsize 16 align 5 textsize 16 resizable
+      class Fl_Data_Table
+    }
+    Fl_Group group_edit_line {
+      dirty_name group_edit_line open
+      xywh {15 230 695 130} labeltype NO_LABEL
+    } {
+      Fl_Input db_gl_transactions_lines_description {
+        label Account
+        macro_name {db gl_transactions_lines description}
+        xywh {190 230 480 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_gl_transactions_lines_group_code {
+        label Code
+        macro_name {db gl_transactions_lines group_code}
+        xywh {20 230 110 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnSearchAccount {
+        label {@<->}
+        dirty_name btnSearchAccount
+        tooltip {Show calendar} xywh {680 230 30 25} labelsize 18 labelcolor 22
+      }
+      Fl_Input db_gl_transactions_lines_debit {
+        label Debit
+        macro_name {db gl_transactions_lines debit}
+        xywh {485 280 110 25} type Float labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_gl_transactions_lines_credit {
+        label Credit
+        macro_name {db gl_transactions_lines credit}
+        xywh {600 280 110 25} type Float labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnSaveLine {
+        label {Save Line}
+        dirty_name btnSaveLine
+        xywh {365 330 110 25} labelsize 16
+      }
+      Fl_Button btnBalanceLine {
+        label Balance
+        dirty_name btnBalanceLine
+        xywh {485 330 110 25} labelsize 16
+      }
+      Fl_Button btnClearLine {
+        label {Clear Line}
+        dirty_name btnClearLine
+        xywh {600 330 110 25} labelsize 16
+      }
+      Fl_Output db_gl_transactions_lines_gl_code {
+        label {Grp.}
+        macro_name {db gl_transactions_lines gl_code}
+        xywh {140 230 40 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_gl_transactions_lines_doc {
+        label Document
+        macro_name {db gl_transactions_lines doc}
+        xywh {20 280 455 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_gl_transactions_lines_due_date {
+        label {Due Date}
+        macro_name {db gl_transactions_lines due_date}
+        xywh {20 330 125 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnDueDateCalendar {
+        label {@<->}
+        dirty_name btnDueDateCalendar
+        tooltip {Show calendar} xywh {155 330 30 25} labelsize 18 labelcolor 22
+      }
+      Fl_Input db_gl_transactions_lines_checked_date {
+        label {Checked Date}
+        macro_name {db gl_transactions_lines checked_date}
+        xywh {195 330 125 25} labelsize 16 align 5 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+    }
+  }
+  Fl_Output db_gl_transactions_id {
+    label {Transaction \#}
+    macro_name {db gl_transactions id}
+    xywh {615 375 100 25} labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Choice dbAction {
+    dirty_name dbAction open
+    xywh {130 374 105 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+    class Fl_Choice_dbAction
+  } {}
+  Fl_Button btnDbAction {
+    label Action
+    dirty_name btnDbAction
+    xywh {15 375 105 25} labelsize 16
+  }
+} 
+
+widget_class EditEntityWindow {
+  label {Edit Entity}
+  xywh {54 85 800 560} type Double hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Output db_entities_id {
+    macro_name {db entities id}
+    dirty_name db_entities_id
+    xywh {5 5 96 25} labeltype NO_LABEL labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Output db_entities_name_ro {
+    dirty_name db_entities_name_ro
+    xywh {110 5 545 25} labeltype NO_LABEL labelsize 16 textsize 16
+  }
+  Fl_Output db_entities_mdate {
+    macro_name {db entities mdate}
+    dirty_name db_entities_mdate
+    tooltip {This record last update date} xywh {666 5 130 25} labeltype NO_LABEL labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Output db_entities_cdate {
+    macro_name {db entities cdate}
+    dirty_name db_entities_cdate
+    tooltip {This record creation date} xywh {665 35 130 25} labeltype NO_LABEL labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Tabs tabs {open
+    xywh {5 35 790 521} selection_color 4 labelsize 16 labelcolor 7 resizable
+  } {
+    Fl_Group tabMain {
+      label Main open
+      xywh {5 62 790 494} color 246 labelsize 16 resizable
+    } {
+      Fl_Input db_entities_name {
+        label Name
+        macro_name {db entities name}
+        dirty_name db_entities_name
+        xywh {115 70 670 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_company {
+        label Company
+        macro_name {db entities company}
+        dirty_name db_entities_company
+        xywh {115 100 670 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_address {
+        label Address
+        macro_name {db entities address}
+        dirty_name db_entities_address
+        xywh {115 130 670 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_zip {
+        label ZIP
+        macro_name {db entities zip}
+        dirty_name db_entities_zip
+        xywh {115 160 95 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_city {
+        label City
+        macro_name {db entities city}
+        dirty_name db_entities_city
+        xywh {311 160 474 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_state {
+        label State
+        macro_name {db entities state}
+        dirty_name db_entities_state
+        xywh {115 189 390 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_country {
+        label Country
+        macro_name {db entities country}
+        dirty_name db_entities_country
+        xywh {585 190 200 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_tax_number {
+        label {Tax Num.}
+        macro_name {db entities tax_number}
+        dirty_name db_entities_tax_number
+        xywh {115 220 200 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_entities_show_on_sales {
+        label Sales
+        macro_name {db entities show_on_sales}
+        dirty_name db_entities_show_on_sales
+        xywh {325 220 115 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_entities_show_on_buys {
+        label Buys
+        macro_name {db entities show_on_buys}
+        dirty_name db_entities_show_on_buys
+        xywh {445 220 125 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_entities_is_active {
+        label Active
+        macro_name {db entities is_active}
+        dirty_name db_entities_is_active
+        xywh {585 220 155 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_phone {
+        label Phone
+        macro_name {db entities phone}
+        dirty_name db_entities_phone
+        xywh {115 249 200 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_fax {
+        label Fax
+        macro_name {db entities fax}
+        dirty_name db_entities_fax
+        xywh {370 249 200 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_entities_use_sales_tax2 {
+        label {Use Sales Tax II}
+        macro_name {db entities use_sales_tax2}
+        dirty_name db_entities_use_sales_tax2
+        xywh {585 250 155 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_email {
+        label Email
+        macro_name {db entities email}
+        dirty_name db_entities_email
+        xywh {115 280 455 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_entities_sales_tax_exempt {
+        label {Sales Tax Exempt}
+        macro_name {db entities sales_tax_exempt}
+        dirty_name db_entities_sales_tax_exempt
+        xywh {585 280 155 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_web {
+        label Web
+        macro_name {db entities web}
+        dirty_name db_entities_web
+        xywh {115 310 455 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_irpf_pct_retention {
+        label {I.R.P.F. %}
+        macro_name {db entities irpf_pct_retention}
+        xywh {585 310 60 25} type Float labelsize 16 align 8 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_contact {
+        label Contact
+        macro_name {db entities contact}
+        dirty_name db_entities_contact
+        xywh {115 340 455 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_entities_gps_coordinates {
+        label GPS
+        macro_name {db entities gps_coordinates}
+        dirty_name db_entities_gps_coordinates
+        xywh {630 340 155 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Group {} {open
+        xywh {675 394 110 151}
+      } {
+        Fl_Box {} {
+          label Spacer
+          xywh {675 394 110 73} labeltype NO_LABEL resizable
+        }
+        Fl_Button btnDbAction {
+          label Action
+          dirty_name btnDbAction
+          xywh {675 470 110 25} labelsize 16
+        }
+        Fl_Choice dbAction {
+          label Action
+          dirty_name dbAction open
+          xywh {675 520 110 25} down_box BORDER_BOX labelsize 16 align 1 textsize 16
+          class Fl_Choice_dbAction
+        } {}
+      }
+      Fl_Tabs {} {open
+        xywh {15 375 650 181} selection_color 4 labelsize 16 labelcolor 7
+      } {
+        Fl_Group tabNotes {
+          label Notes open
+          xywh {15 405 650 150} labelsize 16
+        } {
+          Fl_Input db_entities_notes {
+            macro_name {db entities notes}
+            dirty_name db_entities_notes
+            xywh {15 405 650 150} type Multiline labeltype NO_LABEL labelsize 16 align 5 textsize 16 resizable
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Fl_Text_Editor_Buffered
+          }
+        }
+        Fl_Group tabTags {
+          label Tags
+          dirty_name tabTags open
+          xywh {15 405 650 150} labelsize 16 hide
+        } {
+          Fl_Input db_entities_tags {
+            macro_name {db entities tags}
+            dirty_name db_entities_tags
+            xywh {15 405 650 150} type Multiline labeltype NO_LABEL labelsize 16 align 5 textsize 16 resizable
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Fl_Text_Editor_Buffered
+          }
+        }
+        Fl_Group tabGroups {
+          label Groups
+          dirty_name tabGroups open
+          xywh {15 400 650 156} hide
+        } {
+          Fl_Tree db_entities_group_id {
+            macro_name {db entities group_id}
+            dirty_name db_entities_group_id
+            xywh {15 405 650 150} labelsize 16
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Flu_Tree_Browser
+          }
+        }
+      }
+      Fl_Check_Button {} {
+        label {Wrap lines}
+        xywh {375 380 102 25} down_box DOWN_BOX value 1 labelsize 16
+      }
+    }
+    Fl_Group tabTotals {
+      label Totals
+      dirty_name tabTotals open
+      xywh {5 62 790 493} color 246 labelsize 16 hide
+    } {
+      Fl_Input db_entities_credit_allowed {
+        label Credit
+        macro_name {db entities credit_allowed}
+        xywh {140 75 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_balance {
+        label Balance
+        macro_name {db entities balance}
+        xywh {140 110 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_sales_quoted {
+        label {Sales Quoted}
+        macro_name {db entities sales_quoted}
+        xywh {140 155 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_sales_ordered {
+        label {Sales Ordered}
+        macro_name {db entities sales_ordered}
+        xywh {140 190 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_sales_delivered {
+        label {Sales Delivered}
+        macro_name {db entities sales_delivered}
+        xywh {140 225 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_sales_invoiced {
+        label {Sales Invoiced}
+        macro_name {db entities sales_invoiced}
+        xywh {140 260 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_sales_discount {
+        label {Sales Discount}
+        macro_name {db entities sales_discount}
+        xywh {140 295 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_sales_paid {
+        label {Sales Paid}
+        macro_name {db entities sales_paid}
+        xywh {140 330 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_buys_quoted {
+        label {Buys Quoted}
+        macro_name {db entities buys_quoted}
+        xywh {410 155 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_buys_ordered {
+        label {Buys Ordered}
+        macro_name {db entities buys_ordered}
+        xywh {410 190 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_buys_received {
+        label {Buys Received}
+        macro_name {db entities buys_received}
+        xywh {410 225 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_buys_invoiced {
+        label {Buys Invoiced}
+        macro_name {db entities buys_invoiced}
+        xywh {410 260 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_buys_paid {
+        label {Buys Paid}
+        macro_name {db entities buys_paid}
+        xywh {410 330 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_entities_buys_discount {
+        label {Buys Discount}
+        macro_name {db entities buys_discount}
+        dirty_name db_entities_buys_discount
+        xywh {410 295 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+    }
+    Fl_Group tabChartStatistics {
+      label Statistics
+      dirty_name tabChartStatistics open
+      xywh {5 62 790 493} color 246 labelsize 16 hide
+    } {}
+    Fl_Group tabHistory {
+      label History open
+      xywh {5 59 790 496} color 246 labelsize 16 hide
+    } {}
+    Fl_Group tabReports {
+      label Reports open
+      xywh {5 59 790 496} color 246 labelsize 16 hide
+    } {
+      Fl_Button btnEntitesListContactReport {
+        label {Entities List Contact Report}
+        xywh {255 100 215 25}
+      }
+      Fl_Progress print_progress {
+        label {Printing Progress}
+        xywh {255 140 215 25}
+      }
+    }
+  }
+} 
+
+widget_class EditProductWindow {
+  label {Edit Products}
+  xywh {34 28 800 560} type Double hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Output db_products_id {
+    macro_name {db products id}
+    dirty_name db_products_id
+    xywh {5 5 96 25} labeltype NO_LABEL labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Output db_products_description_ro {
+    dirty_name db_products_description_ro
+    xywh {110 5 545 25} labeltype NO_LABEL labelsize 16 textsize 16
+  }
+  Fl_Output db_products_mdate {
+    macro_name {db products mdate}
+    dirty_name db_products_mdate
+    xywh {666 5 130 25} labeltype NO_LABEL labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Output db_products_cdate {
+    macro_name {db products cdate}
+    xywh {665 35 130 25} labeltype NO_LABEL labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Tabs tabs {
+    xywh {5 35 790 520} selection_color 4 labelsize 16 labelcolor 7 resizable
+  } {
+    Fl_Group tabMain {
+      label Main
+      xywh {5 60 790 495} color 246 labelsize 16 resizable
+    } {
+      Fl_Input db_products_reference_code {
+        label Reference
+        macro_name {db products reference_code}
+        xywh {115 70 165 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_supplier_code {
+        label {Ref. Supp.}
+        macro_name {db products supplier_code}
+        dirty_name db_products_supplier_code
+        xywh {380 70 165 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_bar_code {
+        label Barcode
+        macro_name {db products bar_code}
+        dirty_name db_products_bar_code
+        xywh {620 70 165 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_sell_description {
+        label Description
+        macro_name {db products sell_description}
+        dirty_name db_products_sell_description
+        xywh {115 100 670 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_buy_description {
+        label {Desc. Supp.}
+        macro_name {db products buy_description}
+        dirty_name db_products_buy_description
+        xywh {115 130 670 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_sell_price {
+        label {Sales Price}
+        macro_name {db products sell_price}
+        dirty_name db_products_sell_price
+        xywh {115 160 110 25} type Float labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Choice db_products_measure_unit_id {
+        label {Measure Unit}
+        macro_name {db products measure_unit_id}
+        dirty_name db_products_measure_unit_id open
+        xywh {370 160 110 25} down_box BORDER_BOX labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Choice_Int
+      } {}
+      Fl_Choice db_products_sales_tax_id {
+        label {V.A.T.}
+        macro_name {db products sales_tax_id}
+        dirty_name db_products_sales_tax_id open
+        xywh {115 190 110 25} down_box BORDER_BOX labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Choice_Int
+      } {}
+      Fl_Choice db_products_warranty_id {
+        label Warranty
+        macro_name {db products warranty_id}
+        dirty_name db_products_warranty_id open
+        xywh {370 190 110 25} down_box BORDER_BOX labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Choice_Int
+      } {}
+      Fl_Input db_products_sell_quantity_min {
+        label {Sell Min. Qty.}
+        macro_name {db products sell_quantity_min}
+        dirty_name db_products_sell_quantity_min
+        xywh {370 250 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_units_by_package {
+        label {Units by Pack.}
+        macro_name {db products units_by_package}
+        dirty_name db_products_units_by_package
+        xywh {370 280 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_weight {
+        label Weight
+        macro_name {db products weight}
+        dirty_name db_products_weight
+        xywh {370 220 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_products_sell_without_stock {
+        label {Sell without stock}
+        macro_name {db products sell_without_stock}
+        xywh {10 250 215 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_products_is_active {
+        label Active
+        macro_name {db products is_active}
+        dirty_name db_products_is_active
+        xywh {10 280 110 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_products_show_on_sales {
+        label Sales
+        macro_name {db products show_on_sales}
+        dirty_name db_products_show_on_sales
+        xywh {10 310 105 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_products_show_on_buys {
+        label Buys
+        macro_name {db products show_on_buys}
+        dirty_name db_products_show_on_buys
+        xywh {10 340 95 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_products_show_on_web {
+        label Web
+        macro_name {db products show_on_web}
+        dirty_name db_products_show_on_web
+        xywh {115 310 120 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_products_show_price_on_web {
+        label {Web price}
+        macro_name {db products show_price_on_web}
+        dirty_name db_products_show_price_on_web
+        xywh {115 340 100 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Group {} {
+        xywh {675 402 110 143}
+      } {
+        Fl_Box {} {
+          label Spacer
+          xywh {675 402 110 68} labeltype NO_LABEL resizable
+        }
+        Fl_Choice dbAction {
+          label Action
+          dirty_name dbAction open
+          xywh {675 520 110 25} down_box BORDER_BOX labelsize 16 align 1 textsize 16
+          class Fl_Choice_dbAction
+        } {}
+        Fl_Button btnDbAction {
+          label Action
+          dirty_name btnDbAction
+          xywh {675 470 110 25} labelsize 16
+        }
+      }
+      Fl_Tabs tabsMoreData {
+        dirty_name tabsMoreData
+        xywh {10 370 650 181} selection_color 4 labelsize 16 labelcolor 7
+      } {
+        Fl_Group tabNotes {
+          label Notes open
+          xywh {10 400 650 150} labelsize 16
+        } {
+          Fl_Input db_products_sell_notes {
+            macro_name {db products sell_notes}
+            dirty_name db_products_sell_notes
+            xywh {10 400 650 150} type Multiline labeltype NO_LABEL labelsize 16 align 5 textsize 16 resizable
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Fl_Text_Editor_Buffered
+          }
+        }
+        Fl_Group tabNotesSupplier {
+          label {Notes Supplier} open
+          xywh {10 400 650 150} labelsize 16 hide
+        } {
+          Fl_Input db_products_buy_notes {
+            macro_name {db products buy_notes}
+            dirty_name db_products_buy_notes
+            xywh {10 400 650 150} type Multiline labeltype NO_LABEL labelsize 16 align 5 textsize 16 resizable
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Fl_Text_Editor_Buffered
+          }
+        }
+        Fl_Group tabTags {
+          label Tags
+          dirty_name tabTags open
+          xywh {10 400 650 150} labelsize 16 hide
+        } {
+          Fl_Input db_products_tags {
+            macro_name {db products tags}
+            dirty_name db_products_tags
+            xywh {10 400 650 150} type Multiline labeltype NO_LABEL labelsize 16 align 5 textsize 16 resizable
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Fl_Text_Editor_Buffered
+          }
+        }
+        Fl_Group tabGroups {
+          label Groups
+          dirty_name tabGroups open
+          xywh {10 395 650 156} hide
+        } {
+          Fl_Tree db_products_group_id {
+            macro_name {db products group_id}
+            dirty_name db_products_group_id
+            xywh {10 400 650 150} labelsize 16
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Flu_Tree_Browser
+          }
+        }
+      }
+      Fl_Button btnImage {
+        xywh {485 158 300 232} box ENGRAVED_BOX color 7 align 80
+        class Fl_Image_Box
+      }
+      Fl_Check_Button {} {
+        label {Wrap lines}
+        callback {db_products_sell_notes->wrap_mode(o->value(), 0);
+db_products_buy_notes->wrap_mode(o->value(), 0);
+db_products_tags->wrap_mode(o->value(), 0);}
+        xywh {370 375 102 25} down_box DOWN_BOX value 1 labelsize 16
+      }
+      Fl_Input db_products_quantity_onhand {
+        label Onhand
+        macro_name {db products quantity_onhand}
+        dirty_name db_products_quantity_onhand
+        xywh {115 220 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+    }
+    Fl_Group tabPrices {
+      label Prices
+      xywh {5 60 790 495} color 246 labelsize 16 hide
+    } {
+      Fl_Group {} {
+        label {Sales Price} open
+        xywh {15 88 770 201} box UP_BOX color 166 labelsize 16
+      } {
+        Fl_Input db_products_buy_price {
+          label {Buy $}
+          macro_name {db products buy_price}
+          dirty_name db_products_buy_price
+          xywh {25 115 115 25} type Float labelsize 16 align 5 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          class Fl_Float_Input_Fmt
+        }
+        Fl_Input db_products_buy_discount {
+          label {Buy Disc. %}
+          macro_name {db products buy_discount}
+          dirty_name db_products_buy_discount
+          xywh {151 115 115 25} type Float labelsize 16 align 5 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          code1 {o->decimal_places(-6);}
+          class Fl_Float_Input_Fmt
+        }
+        Fl_Input db_products_buy_other_costs {
+          label {Other Costs $}
+          macro_name {db products buy_other_costs}
+          dirty_name db_products_buy_other_costs
+          xywh {278 115 115 25} type Float labelsize 16 align 5 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          class Fl_Float_Input_Fmt
+        }
+        Fl_Input db_products_sell_markup {
+          label {Markup %}
+          macro_name {db products sell_markup}
+          dirty_name db_products_sell_markup
+          xywh {404 115 115 25} type Float labelsize 16 align 5 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          code1 {//o->decimal_places(-6);}
+          class Fl_Float_Input_Fmt
+        }
+        Fl_Input markup_to_discount {
+          label {Margin %}
+          xywh {531 115 115 25} type Float labelsize 16 align 5 textsize 16
+          code0 {//o->decimal_places(-6);}
+          class Fl_Float_Input_Fmt
+        }
+        Fl_Input db_products_sell_price_ro {
+          label {Sales $}
+          dirty_name db_products_sell_price_ro
+          xywh {658 115 115 25} type Float labelsize 16 align 5 textsize 16
+          class Fl_Float_Input_Fmt
+        }
+        Fl_Input db_products_price_decimals {
+          label {Decimals for calculation}
+          macro_name {db products price_decimals}
+          dirty_name db_products_price_decimals
+          xywh {530 150 30 25} type Int labelfont 1 labelsize 16 textfont 1 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          code1 {//o->decimal_places(-6);}
+        }
+        Fl_Button btnSaveProrduct {
+          label Save
+          xywh {662 150 111 25} labelsize 16
+        }
+        Fl_Input db_products_stock_min {
+          label {Stock Min.}
+          macro_name {db products stock_min}
+          dirty_name db_products_stock_min
+          xywh {665 195 110 25} type Float labelsize 16 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          code1 {o->decimal_places(-6);}
+        }
+        Fl_Input db_products_stock_max {
+          label {Stock Max.}
+          macro_name {db products stock_max}
+          dirty_name db_products_stock_max
+          xywh {665 225 110 25} type Float labelsize 16 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          code1 {o->decimal_places(-6);}
+        }
+        Fl_Input db_products_buy_quantity_min {
+          label {Buy Min. Qty.}
+          macro_name {db products buy_quantity_min}
+          dirty_name db_products_buy_quantity_min
+          xywh {665 255 110 25} type Float labelsize 16 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          code1 {o->decimal_places(-6);}
+        }
+        Fl_Input db_products_price_formula {
+          label {Price formula}
+          macro_name {db products price_formula}
+          dirty_name db_products_price_formula
+          xywh {25 197 495 83} type Multiline labelsize 16 align 5 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        }
+        Fl_Output db_products_price_date {
+          label {Last Update}
+          dirty_name db_products_price_date
+          xywh {25 150 130 25} labelsize 16 align 8 textsize 16
+        }
+      }
+      Fl_Box {} {
+        label Spacer
+        xywh {15 290 770 40} labeltype NO_LABEL resizable
+      }
+      Fl_Group productPrices {
+        dirty_name productPrices open
+        xywh {15 332 770 212} box UP_BOX color 166 labeltype NO_LABEL labelsize 16
+      } {}
+    }
+    Fl_Group tabKit {
+      label Kit
+      dirty_name tabKit open
+      xywh {5 59 790 495} color 246 labelsize 16 hide
+    } {}
+    Fl_Group tabChartStatistics {
+      label Statistics open
+      xywh {5 60 790 495} color 246 labelsize 16 hide
+    } {}
+    Fl_Group tabHistory {
+      label History open
+      xywh {5 60 790 495} color 246 labelsize 16 hide
+    } {}
+    Fl_Group tabReports {
+      label Reports open
+      xywh {5 60 790 495} box UP_BOX color 246 labelsize 16 hide
+    } {
+      Fl_Group grpExportImport {
+        label {Export / Import} open
+        xywh {15 465 770 80} box ENGRAVED_FRAME labelsize 16
+      } {
+        Fl_Button btnProductsExport {
+          label {Products Export}
+          xywh {25 475 175 25} labelsize 16
+        }
+        Fl_Button btnProductsImport {
+          label {Products Import}
+          xywh {25 510 175 25} labelsize 16
+        }
+        Fl_Check_Button chkWithoutPrices {
+          label {Withouth Prices}
+          xywh {225 480 150 25} down_box DOWN_BOX labelsize 16
+        }
+        Fl_Check_Button chkWebOnly {
+          label {WEB Only}
+          xywh {225 510 150 25} down_box DOWN_BOX labelsize 16
+        }
+        Fl_Box boxExportImportCount {
+          label 0
+          xywh {405 499 42 25} labelsize 16
+        }
+        Fl_Button btnProductGroupsExport {
+          label {Product Groups Export}
+          xywh {555 475 220 25} labelsize 16
+        }
+        Fl_Button btnProductGroupsImport {
+          label {Product Groups import}
+          xywh {555 510 220 25} labelsize 16
+        }
+      }
+      Fl_Button btnUpdateWeb {
+        label {Update WEB}
+        xywh {610 70 175 25} labelsize 16
+      }
+      Fl_Group grpPrintPriceList {
+        label {Price List}
+        dirty_name grpPrintPriceList open
+        xywh {10 85 195 165} box ENGRAVED_FRAME labelsize 16
+      } {
+        Fl_Check_Button chkPriceListWithVAT {
+          label {With V.A.T.}
+          xywh {20 95 175 25} down_box DOWN_BOX labelsize 16
+        }
+        Fl_Check_Button chkPriceListSellOnWeb {
+          label {Sell on WEB}
+          xywh {20 125 170 25} down_box DOWN_BOX labelsize 16
+        }
+        Fl_Button btnPrintPriceList {
+          label Print
+          xywh {20 215 175 25} labelsize 16
+        }
+        Fl_Check_Button chkPriceListSellSales {
+          label Sales
+          xywh {20 155 175 25} down_box DOWN_BOX labelsize 16
+        }
+        Fl_Check_Button chkPriceListSellPDF {
+          label PDF
+          xywh {20 185 175 25} down_box DOWN_BOX labelsize 16
+        }
+      }
+    }
+    Fl_Group tabTotals {
+      label Totals
+      dirty_name tabTotals open
+      xywh {5 60 790 495} color 246 labelsize 16 hide
+    } {
+      Fl_Input db_products_quantity_quoted_sales {
+        label {Quantity quoted sales}
+        macro_name {db products quantity_quoted_sales}
+        xywh {220 80 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_ordered_sales {
+        label {Quantity ordered sales}
+        macro_name {db products quantity_ordered_sales}
+        xywh {220 115 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_delivered {
+        label {Quantity delivered}
+        macro_name {db products quantity_delivered}
+        xywh {220 150 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_invoiced_sales {
+        label {Quantity invoiced sales}
+        macro_name {db products quantity_invoiced_sales}
+        xywh {220 185 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_lost {
+        label {Quantity lost}
+        macro_name {db products quantity_lost}
+        xywh {220 220 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_quoted_buys {
+        label {Quantity quoted buys}
+        macro_name {db products quantity_quoted_buys}
+        xywh {665 85 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_ordered_buys {
+        label {Quantity ordered buys}
+        macro_name {db products quantity_ordered_buys}
+        xywh {665 120 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_received {
+        label {Quantity received}
+        macro_name {db products quantity_received}
+        xywh {665 155 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_products_quantity_invoiced_buys {
+        label {Quantity invoiced buys}
+        macro_name {db products quantity_invoiced_buys}
+        xywh {665 190 110 25} type Float labelsize 16 textsize 16
+        code0 {o->decimal_places(-6);}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+    }
+  }
+} 
+
+widget_class EditOrderWindow {
+  label {Edit Order}
+  xywh {255 97 800 560} type Double labelsize 16 hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Group {} {open
+    xywh {5 1 792 62}
+  } {
+    Fl_Output db_orders_mdate {
+      macro_name {db orders mdate}
+      dirty_name db_orders_mdate
+      xywh {670 5 125 25} labeltype NO_LABEL labelsize 16 textsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+    }
+    Fl_Box db_orders_order_type_id {
+      macro_name {db orders order_type_id}
+      dirty_name db_orders_order_type_id
+      tooltip {Selection of the order type} xywh {5 5 655 25} box DOWN_BOX labeltype NO_LABEL labelfont 1 labelsize 16
+      code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      class Flu_Combo_List
+    }
+    Fl_Pack pack_line2 {open
+      xywh {5 35 790 25} type HORIZONTAL labelsize 16
+      code0 {o->spacing(5);}
+      code1 {o->with_label(1);}
+    } {
+      Fl_Input db_orders_series {
+        label Series
+        macro_name {db orders series}
+        dirty_name db_orders_series
+        xywh {55 35 45 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_order_number {
+        label Number
+        macro_name {db orders order_number}
+        dirty_name db_orders_order_number
+        xywh {172 35 95 25} type Int labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        code1 {o->use_numeric_format(0);}
+      }
+      Fl_Input db_orders_entity_id {
+        label Entity
+        macro_name {db orders entity_id}
+        dirty_name db_orders_entity_id
+        xywh {319 35 95 25} type Int labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_entity_name {
+        macro_name {db orders entity_name}
+        dirty_name db_orders_entity_name
+        tooltip {Type partal description to search on availlable entities} xywh {420 35 335 25} labeltype NO_LABEL labelsize 16 textfont 1 textsize 16 resizable
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnSearchEntity {
+        label {@<->}
+        tooltip {Show entities search window} xywh {765 35 30 25} labelsize 18 labelcolor 22
+      }
+    }
+  }
+  Fl_Input db_orders_entity_order_number {
+    label {Their Nº}
+    macro_name {db orders entity_order_number}
+    dirty_name db_orders_entity_order_number
+    xywh {585 65 210 25} labelsize 16 textsize 16
+    code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+  }
+  Fl_Tabs tabs {open
+    xywh {5 68 790 487} selection_color 4 labelsize 16 labelcolor 7 resizable
+  } {
+    Fl_Group tabMain {
+      label Main open
+      xywh {5 95 790 460} color 246 labelfont 2 labelsize 16 resizable
+    } {
+      Fl_Pack pack_line3 {open
+        xywh {11 105 780 25} type HORIZONTAL labelsize 16
+        code0 {o->spacing(5);}
+        code1 {o->with_label(1);}
+      } {
+        Fl_Output out_lines {
+          label Lines
+          dirty_name out_lines
+          xywh {57 105 69 25} labelsize 16 textsize 16
+          code0 {o->right_to_left(1);}
+        }
+        Fl_Output db_orders_weight_total {
+          label Weight
+          dirty_name db_orders_weight_total
+          xywh {189 105 110 25} labelsize 16 textsize 16
+          code0 {o->right_to_left(1);}
+          code1 {o->decimal_places(-2);}
+          code2 {o->use_numeric_format(1);}
+        }
+        Fl_Button btnCalcDelivery {
+          label {@<->}
+          tooltip {Show delivery calc window} xywh {309 105 30 25} labelsize 18 labelcolor 22
+        }
+        Fl_Choice db_orders_payment_type_id {
+          macro_name {db orders payment_type_id}
+          dirty_name db_orders_payment_type_id
+          xywh {345 105 235 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textfont 1 textsize 16 resizable
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          class Fl_Choice_Int
+        } {}
+        Fl_Button btnSortLines {
+          label {@2}
+          tooltip {Sort lines by description} xywh {590 105 30 25} labelsize 18 labelcolor 22
+        }
+        Fl_Input db_orders_order_date {
+          macro_name {db orders order_date}
+          dirty_name db_orders_order_date
+          xywh {629 105 120 25} labeltype NO_LABEL labelsize 16 textfont 1 textsize 16
+          code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        }
+        Fl_Button btnShowCalendar {
+          label {@<->}
+          tooltip {Show calendar} xywh {760 105 30 25} labelsize 18 labelcolor 22
+        }
+      }
+      Fl_Browser grid_lines {
+        dirty_name grid_lines
+        xywh {10 135 780 150} labelsize 16 textsize 16 resizable
+        class Fl_Data_Table
+      }
+      Fl_Group {} {
+        xywh {10 290 781 260}
+      } {
+        Fl_Group group_totals {open
+          xywh {600 291 190 259} box UP_BOX color 174
+        } {
+          Fl_Output db_orders_discount_amt {
+            label Discount
+            macro_name {db orders discount_amt}
+            dirty_name db_orders_discount_amt
+            xywh {685 297 100 25} labelsize 16 textsize 16
+            code0 {o->right_to_left(1);}
+            code1 {o->use_numeric_format(1);}
+            code2 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          }
+          Fl_Output db_orders_subtotal_amt {
+            label Subtotal
+            macro_name {db orders subtotal_amt}
+            dirty_name db_orders_subtotal_amt
+            xywh {684 326 100 25} labelsize 16 textsize 16
+            code0 {o->right_to_left(1);}
+            code1 {o->use_numeric_format(1);}
+            code2 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          }
+          Fl_Output db_orders_sales_tax1_amt {
+            label {V.A.T.}
+            macro_name {db orders sales_tax1_amt}
+            dirty_name db_orders_sales_tax1_amt
+            xywh {685 356 100 25} labelsize 16 textsize 16
+            code0 {o->right_to_left(1);}
+            code1 {o->use_numeric_format(1);}
+            code2 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          }
+          Fl_Output db_orders_sales_tax2_amt {
+            label {R.E.}
+            macro_name {db orders sales_tax2_amt}
+            dirty_name db_orders_sales_tax2_amt
+            xywh {684 386 100 25} labelsize 16 textsize 16
+            code0 {o->right_to_left(1);}
+            code1 {o->use_numeric_format(1);}
+            code2 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          }
+          Fl_Output db_orders_irpf_amt {
+            label {I.R.P.F.}
+            macro_name {db orders irpf_amt}
+            xywh {685 416 100 25} labelsize 16 textsize 16
+            code0 {o->right_to_left(1);}
+            code1 {o->use_numeric_format(1);}
+            code2 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          }
+          Fl_Output db_orders_total_amt {
+            label Total
+            macro_name {db orders total_amt}
+            dirty_name db_orders_total_amt
+            xywh {610 453 174 33} color 119 labelfont 1 align 5 textfont 1 textsize 30
+            code0 {o->right_to_left(1);}
+            code1 {o->use_numeric_format(1);}
+            code2 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+          }
+          Fl_Input db_orders_cash {
+            label Cash
+            macro_name {db orders cash}
+            dirty_name db_orders_cash
+            xywh {685 490 100 25} type Float labelfont 1 labelsize 16 textfont 1 textsize 16
+            code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            class Fl_Float_Input_Fmt
+          }
+          Fl_Output cash_return {
+            label Return
+            dirty_name cash_return
+            xywh {685 520 100 25} labelfont 1 labelsize 16 textfont 1 textsize 16
+            code0 {o->right_to_left(1);}
+            code1 {o->use_numeric_format(1);}
+          }
+        }
+        Fl_Button btnPrint {
+          label Print
+          dirty_name btnPrint
+          xywh {485 525 100 25} labelsize 16
+          class My_Fl_Return_Button
+        }
+        Fl_Tabs linesTab {
+          dirty_name linesTab open
+          xywh {10 290 585 230} selection_color 4 labelfont 2 labelsize 16 labelcolor 7
+        } {
+          Fl_Group group_lines {
+            label {Line Edit} open
+            xywh {10 321 585 199} box UP_BOX color 166 labelfont 2 labelsize 16
+          } {
+            Fl_Output db_orders_lines_batch_order_line_quantity {
+              label {Batch Qty.}
+              macro_name {db orders_lines batch_order_line_quantity}
+              xywh {265 330 110 25} labelsize 16 textsize 16
+              code0 {o->right_to_left(1);}
+              code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+            Fl_Input db_orders_lines_batch_order_line_id {
+              label {Batch \#}
+              macro_name {db orders_lines batch_order_line_id}
+              xywh {435 329 110 25} type Int labelsize 16 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+            Fl_Button btnSearchBatchOrderLineId {
+              label {@<->}
+              dirty_name btnSearchBatchOrderLineId
+              tooltip {Show products search window} xywh {555 329 30 25} labelsize 18 labelcolor 22
+            }
+            Fl_Output db_orders_lines_xref_order_line_quantity {
+              label {XRef. Qty.}
+              macro_name {db orders_lines xref_order_line_quantity}
+              xywh {265 360 110 25} labelsize 16 textsize 16
+              code0 {o->right_to_left(1);}
+              code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+            Fl_Input db_orders_lines_xref_order_line_id {
+              label {XRef \#}
+              macro_name {db orders_lines xref_order_line_id}
+              xywh {435 359 110 25} type Int labelsize 16 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+            Fl_Button btnSearchXrefOrderLineId {
+              label {@<->}
+              dirty_name btnSearchXrefOrderLineId
+              tooltip {Show products search window} xywh {555 359 30 25} labelsize 18 labelcolor 22
+            }
+            Fl_Input db_orders_lines_product_id {
+              label Code
+              macro_name {db orders_lines product_id}
+              dirty_name db_orders_lines_product_id
+              xywh {21 387 70 25} type Int labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+            Fl_Input db_orders_lines_description {
+              label Description
+              macro_name {db orders_lines description}
+              dirty_name db_orders_lines_description
+              tooltip {Type partal description to search on availlable products} xywh {101 387 444 25} labelsize 16 align 5 textfont 1 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+            Fl_Button btnSearchProduct {
+              label {@<->}
+              tooltip {Show products search window} xywh {555 387 30 25} labelsize 18 labelcolor 22
+            }
+            Fl_Input db_orders_lines_quantity {
+              label Quantity
+              macro_name {db orders_lines quantity}
+              dirty_name db_orders_lines_quantity
+              xywh {21 435 84 25} type Float labelfont 1 labelsize 16 align 5 textfont 1 textsize 16
+              code0 {o->decimal_places(-6);}
+              code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class My_Fl_Float_Input
+            }
+            Fl_Input db_orders_lines_price {
+              label Price
+              macro_name {db orders_lines price}
+              xywh {115 435 108 25} type Float labelfont 1 labelsize 16 align 5 textfont 1 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class My_Fl_Float_Input
+            }
+            Fl_Input db_orders_lines_price_decimals {
+              label {(.)}
+              macro_name {db orders_lines price_decimals}
+              tooltip {Number of decimals to use on calculations} xywh {230 435 20 25} type Int labelsize 16 align 1 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+            Fl_Input db_orders_lines_weight {
+              label Weight
+              macro_name {db orders_lines weight}
+              xywh {255 435 70 25} type Float labelsize 16 align 5 textsize 16
+              code0 {o->decimal_places(-6);}
+              code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class My_Fl_Float_Input
+            }
+            Fl_Input db_orders_lines_first_total {
+              label {1st total}
+              macro_name {db orders_lines first_total}
+              xywh {330 435 100 25} type Float labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Input db_orders_lines_discount_pct {
+              label {Disc. %}
+              macro_name {db orders_lines discount_pct}
+              xywh {435 435 60 25} type Float labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class My_Fl_Float_Input
+            }
+            Fl_Input db_orders_lines_discount_amt {
+              label {Disc. $}
+              macro_name {db orders_lines discount_amt}
+              xywh {505 435 80 25} type Float labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Input db_orders_lines_line_subtotal {
+              label Subtotal
+              macro_name {db orders_lines line_subtotal}
+              xywh {21 485 108 25} type Float labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Input db_orders_lines_sales_tax2_pct {
+              label {R.E. %}
+              macro_name {db orders_lines sales_tax2_pct}
+              xywh {139 485 64 25} type Float labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Input db_orders_lines_sales_tax1_pct {
+              label {V.A.T. %}
+              macro_name {db orders_lines sales_tax1_pct}
+              xywh {213 485 64 25} type Float labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Input db_orders_lines_sales_tax1_amt {
+              label {V.A.T. $}
+              macro_name {db orders_lines sales_tax1_amt}
+              xywh {287 485 87 25} type Float labelsize 16 align 5 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Button btnSaveLine {
+              label Save
+              tooltip {Save the line currently edited} xywh {384 485 83 25} labelfont 1 labelsize 16
+              class My_Fl_Return_Button
+            }
+            Fl_Input db_orders_lines_line_total {
+              label Total
+              macro_name {db orders_lines line_total}
+              xywh {477 485 108 25} type Float labelfont 1 labelsize 16 align 5 textfont 1 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+              class Fl_Float_Input_Fmt
+            }
+          }
+          Fl_Group tabLineNotes {
+            label {Line Notes}
+            dirty_name tabLineNotes open
+            xywh {10 320 585 200} labelfont 2 labelsize 16 hide
+          } {
+            Fl_Input db_orders_lines_notes {
+              label Notes
+              macro_name {db orders_lines notes}
+              dirty_name db_orders_lines_description
+              tooltip {Type partial description to search on availlable products} xywh {80 330 505 180} type Multiline labelsize 16 textsize 16
+              code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+            }
+          }
+          Fl_Group tabDues {
+            label Dues
+            dirty_name tabDues open
+            xywh {10 320 585 200} labelfont 2 labelsize 16 hide
+          } {
+            Fl_Browser grid_dues {
+              dirty_name grid_dues
+              xywh {15 330 575 130} labelsize 16 textsize 16
+              class Fl_Data_Table
+            }
+            Fl_Output due_id {
+              label ID
+              dirty_name due_id
+              xywh {15 485 80 25} labelsize 16 align 5 textsize 16
+              code0 {o->right_to_left(1);}
+            }
+            Fl_Input due_date {
+              label Due
+              dirty_name due_date
+              xywh {100 485 125 25} labelsize 16 align 5 textfont 1 textsize 16
+            }
+            Fl_Button btnShowCalendarDueDate {
+              label {@<->}
+              dirty_name btnShowCalendarDueDate
+              tooltip {Show calendar} xywh {230 485 30 25} labelsize 18 labelcolor 22
+            }
+            Fl_Input due_pct {
+              label {Pct. %}
+              dirty_name due_pct
+              xywh {270 485 80 25} type Float labelfont 1 labelsize 16 align 5 textfont 1 textsize 16
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Input due_amount {
+              label Amount
+              dirty_name due_amount
+              xywh {355 485 120 25} type Float labelfont 1 labelsize 16 align 5 textfont 1 textsize 16
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Button btnDueSave {
+              label Save
+              dirty_name btnDueSave
+              xywh {485 485 100 25} labelsize 16
+              class My_Fl_Return_Button
+            }
+          }
+          Fl_Group tabPayments {
+            label Payments
+            dirty_name tabPayments open
+            xywh {10 320 585 200} labelfont 2 labelsize 16 hide
+          } {
+            Fl_Browser grid_payments {
+              dirty_name grid_payments
+              xywh {15 330 575 130} labelsize 16 textsize 16
+              class Fl_Data_Table
+            }
+            Fl_Output payment_id {
+              label ID
+              dirty_name payment_id
+              xywh {15 485 80 25} labelsize 16 align 5 textsize 16
+              code0 {o->right_to_left(1);}
+            }
+            Fl_Input payment_date {
+              label Date
+              dirty_name payment_date
+              xywh {100 485 125 25} labelsize 16 align 5 textfont 1 textsize 16
+            }
+            Fl_Button btnShowCalendarPaymentDate {
+              label {@<->}
+              dirty_name btnShowCalendarPaymentDate
+              tooltip {Show calendar} xywh {230 485 30 25} labelsize 18 labelcolor 22
+            }
+            Fl_Input payemnt_amount {
+              label Amount
+              dirty_name payemnt_amount
+              xywh {270 485 120 25} type Float labelfont 1 labelsize 16 align 5 textfont 1 textsize 16
+              class Fl_Float_Input_Fmt
+            }
+            Fl_Button btnPaymentSave {
+              label Save
+              dirty_name btnPaymentSave
+              xywh {395 485 100 25} labelsize 16
+              class My_Fl_Return_Button
+            }
+          }
+        }
+      }
+      Fl_Button btnNumberOrder {
+        label Number
+        dirty_name btnNumberOrder
+        xywh {230 525 82 25} labelsize 16
+        class My_Fl_Return_Button
+      }
+      Fl_Choice dbAction {
+        dirty_name dbAction open
+        xywh {9 525 119 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+        class Fl_Choice_dbAction
+      } {}
+      Fl_Button btnDbAction {
+        label Action
+        dirty_name btnDbAction
+        tooltip {Perform the selected action on this order} xywh {138 525 82 25} labelfont 1 labelsize 16
+        class My_Fl_Return_Button
+      }
+    }
+    Fl_Group tabDelivery {
+      label Delivery
+      xywh {5 95 790 460} color 246 labelfont 2 labelsize 16 hide
+    } {
+      Fl_Input db_orders_entity_address {
+        label Address
+        macro_name {db orders entity_address}
+        dirty_name db_orders_entity_address
+        xywh {91 105 694 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_entity_zip {
+        label ZIP
+        macro_name {db orders entity_zip}
+        dirty_name db_orders_entity_zip
+        xywh {91 135 95 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_entity_city {
+        label City
+        macro_name {db orders entity_city}
+        dirty_name db_orders_entity_city
+        xywh {288 135 497 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_entity_state {
+        label State
+        macro_name {db orders entity_state}
+        dirty_name db_orders_entity_state
+        xywh {91 165 407 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_entity_country {
+        label Country
+        macro_name {db orders entity_country}
+        dirty_name db_orders_entity_country
+        xywh {585 165 201 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_entity_phone {
+        label Phone
+        macro_name {db orders entity_phone}
+        dirty_name db_orders_entity_phone
+        xywh {91 195 201 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_entity_tax_number {
+        label {Tax Num.}
+        macro_name {db orders entity_tax_number}
+        dirty_name db_orders_entity_tax_number
+        xywh {585 195 200 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Input db_orders_order_valid_till_date {
+        label {Valid till}
+        macro_name {db orders order_valid_till_date}
+        xywh {90 225 121 25} labelsize 16 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Button btnShowCalendarValidTill {
+        label {@<->}
+        dirty_name btnShowCalendarValidTill
+        tooltip {Show calendar} xywh {221 225 30 25} labelsize 18 labelcolor 22
+      }
+      Fl_Check_Button db_orders_entity_use_sales_tax2 {
+        label {Use Sales Tax II}
+        macro_name {db orders entity_use_sales_tax2}
+        dirty_name db_orders_entity_use_sales_tax2
+        xywh {585 225 155 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Check_Button db_orders_entity_sales_tax_exempt {
+        label {Sales Tax Exempt}
+        macro_name {db orders entity_sales_tax_exempt}
+        dirty_name db_orders_entity_sales_tax_exempt
+        xywh {585 255 155 25} down_box DOWN_BOX labelsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+      }
+      Fl_Text_Editor db_orders_notes {
+        label Notes
+        macro_name {db orders notes}
+        dirty_name db_orders_notes
+        xywh {15 395 770 150} labelsize 16 align 5 textsize 16 resizable
+        code0 {\#include <FL/Fl_Text_Editor.H>}
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Text_Editor_Buffered
+      }
+      Fl_Check_Button {} {
+        label {Wrap lines}
+        callback {db_orders_notes->wrap_mode(o->value(), 0);}
+        xywh {125 375 125 25} down_box DOWN_BOX value 1 labelsize 16
+      }
+      Fl_Input db_orders_irpf_pct_retention {
+        label {I.R.P.F. %}
+        macro_name {db orders irpf_pct_retention}
+        xywh {585 285 70 25} type Float labelsize 16 align 8 textsize 16
+        code0 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+    }
+    Fl_Group tabOptions {
+      label Options
+      dirty_name tabOptions
+      xywh {5 95 790 460} color 246 labelfont 2 labelsize 16 hide
+    } {
+      Fl_Check_Button opt_ask_for_printer {
+        label {Ask for printer}
+        dirty_name opt_ask_for_printer
+        xywh {20 115 155 25} down_box DOWN_BOX labelsize 16
+      }
+      Fl_Check_Button opt_print_only_data {
+        label {Print only data}
+        dirty_name opt_print_only_data
+        xywh {20 150 155 25} down_box DOWN_BOX labelsize 16
+      }
+      Fl_Check_Button opt_print_to_pdf {
+        label {Print to PDF}
+        dirty_name opt_print_to_pdf
+        xywh {20 180 155 25} down_box DOWN_BOX labelsize 16
+      }
+      Fl_Choice opt_print_page_format {
+        dirty_name opt_print_page_format
+        xywh {20 215 130 25} down_box BORDER_BOX labeltype NO_LABEL labelsize 16 textsize 16
+        class Fl_Choice_Str
+      } {}
+      Fl_Button btnOptPrint {
+        label Print
+        dirty_name btnOptPrint
+        tooltip {Print the current order} xywh {20 250 130 25} labelsize 16
+      }
+      Fl_Input opt_email_program {
+        label {Email program}
+        dirty_name opt_email_program
+        tooltip {Type partal description to search on availlable entities} xywh {260 145 520 25} labelsize 16 align 5 textsize 16
+      }
+      Fl_Input opt_email_program_command {
+        label {Email program parameters}
+        dirty_name opt_email_program_command
+        tooltip {Type partal description to search on availlable entities} xywh {260 210 520 25} labelsize 16 align 5 textsize 16
+      }
+      Fl_Button btnOptSendEmail {
+        label {Send as email}
+        dirty_name btnOptSendEmail
+        tooltip {Print the current order} xywh {260 250 130 25} labelsize 16
+      }
+      Fl_Text_Editor opt_print_order_company_info {
+        label {Company Info}
+        dirty_name opt_print_order_company_info
+        xywh {20 350 375 200} labelsize 16 align 5 textsize 16
+        code0 {\#include <FL/Fl_Text_Editor.H>}
+        class Fl_Text_Editor_Buffered
+      }
+      Fl_Check_Button {} {
+        label {Wrap lines}
+        callback {opt_print_order_company_info->wrap_mode(o->value(), 0);}
+        xywh {200 330 125 25} down_box DOWN_BOX value 1 labelsize 16
+      }
+      Fl_Text_Editor opt_print_order_bottom_info {
+        label {Company Info}
+        dirty_name opt_print_order_bottom_info
+        xywh {405 350 375 200} labelsize 16 align 5 textsize 16 resizable
+        code0 {\#include <FL/Fl_Text_Editor.H>}
+        class Fl_Text_Editor_Buffered
+      }
+      Fl_Check_Button {} {
+        label {Wrap lines}
+        callback {opt_print_order_bottom_info->wrap_mode(o->value(), 0);}
+        xywh {590 330 125 25} down_box DOWN_BOX value 1 labelsize 16
+      }
+    }
+    Fl_Group tabChartStatistics {
+      label Statistics open
+      xywh {5 95 790 460} color 246 labelfont 2 labelsize 16 hide
+    } {}
+    Fl_Group tabHistory {
+      label History open
+      xywh {5 95 790 460} color 246 labelfont 2 labelsize 16 hide
+    } {}
+    Fl_Group tabPrintPreview {
+      label Preview open
+      xywh {5 95 790 460} color 246 labelfont 2 labelsize 16 hide
+    } {}
+    Fl_Group tabTotals {
+      label Totals
+      dirty_name tabTotals
+      xywh {5 95 790 460} color 246 labelfont 2 labelsize 16 hide
+    } {
+      Fl_Input totals_balance {
+        label Balance
+        dirty_name totals_balance
+        xywh {145 155 110 25} type Float labelsize 16 textsize 16
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_quoted {
+        label {Sales Quoted}
+        macro_name {db totals_overview sales_quoted}
+        xywh {145 200 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_ordered {
+        label {Sales Ordered}
+        macro_name {db totals_overview sales_ordered}
+        xywh {145 235 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_delivered {
+        label {Sales Delivered}
+        macro_name {db totals_overview sales_delivered}
+        xywh {145 270 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_invoiced {
+        label {Sales Invoiced}
+        macro_name {db totals_overview sales_invoiced}
+        xywh {145 305 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_discount {
+        label {Sales Discount}
+        macro_name {db totals_overview sales_discount}
+        xywh {145 340 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_tax1 {
+        label {Sales Tax1}
+        macro_name {db totals_overview sales_tax1}
+        xywh {145 375 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_tax2 {
+        label {Sales Tax2}
+        macro_name {db totals_overview sales_tax2}
+        xywh {145 410 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_sales_paid {
+        label {Sales Paid}
+        macro_name {db totals_overview sales_paid}
+        xywh {145 445 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Button btnRefreshTotals {
+        label Refresh
+        dirty_name btnRefreshTotals
+        xywh {415 155 110 25} labelsize 16
+        class My_Fl_Return_Button
+      }
+      Fl_Input db_totals_overview_buys_quoted {
+        label {Buys Quoted}
+        macro_name {db totals_overview buys_quoted}
+        xywh {415 200 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_buys_ordered {
+        label {Buys Ordered}
+        macro_name {db totals_overview buys_ordered}
+        xywh {415 235 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_buys_received {
+        label {Buys Received}
+        macro_name {db totals_overview buys_received}
+        xywh {415 270 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_buys_invoiced {
+        label {Buys Invoiced}
+        macro_name {db totals_overview buys_invoiced}
+        xywh {415 305 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_buys_discount {
+        label {Buys Discount}
+        macro_name {db totals_overview buys_discount}
+        xywh {415 340 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_buys_tax1 {
+        label {Buys Tax1}
+        macro_name {db totals_overview buys_tax1}
+        xywh {415 375 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_buys_tax2 {
+        label {Buys Tax2}
+        macro_name {db totals_overview buys_tax2}
+        xywh {415 410 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+      Fl_Input db_totals_overview_buys_paid {
+        label {Buys Paid}
+        macro_name {db totals_overview buys_paid}
+        xywh {415 445 110 25} type Float labelsize 16 textsize 16
+        code1 {=add_input_field_to_map("$(1)", "$(2)", $(name));}
+        class Fl_Float_Input_Fmt
+      }
+    }
+  }
+} 
+
+widget_class PosWindow {
+  label {Point of Sales}
+  xywh {53 84 800 560} type Double hide resizable
+  class Edit_Base_Window
+} {
+  Fl_Group groupOrder {
+    dirty_name groupOrder open
+    xywh {5 5 190 550} box ENGRAVED_BOX
+  } {
+    Fl_Button btnUser {
+      label User
+      dirty_name btnUser
+      xywh {10 10 180 30} labelfont 1 labelsize 26
+    }
+    Fl_Table grid_order {
+      dirty_name grid_order open
+      xywh {10 48 180 310} resizable
+      class Fl_Data_Table
+    } {}
+    Fl_Output orderTotal {
+      label Total
+      dirty_name orderTotal
+      xywh {70 364 120 31} labelfont 1 labelsize 16 textfont 1 textsize 20
+    }
+    Fl_Button btnOrder1 {
+      label 1
+      dirty_name btnOrder1
+      xywh {10 415 85 30} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOrder2 {
+      label 2
+      dirty_name btnOrder2
+      xywh {105 415 85 30} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOrder3 {
+      label 3
+      dirty_name btnOrder3
+      xywh {10 450 85 30} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOrder4 {
+      label 4
+      dirty_name btnOrder4
+      xywh {105 450 85 30} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOrder5 {
+      label 5
+      dirty_name btnOrder5
+      xywh {10 485 85 30} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOrder6 {
+      label 6
+      dirty_name btnOrder6
+      xywh {105 485 85 30} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOrder7 {
+      label 7
+      dirty_name btnOrder7
+      xywh {10 520 85 30} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOrder8 {
+      label 8
+      dirty_name btnOrder8
+      xywh {105 520 85 30} labelfont 1 labelsize 16
+    }
+  }
+  Fl_Group groupProducts {
+    dirty_name groupProducts open
+    xywh {200 5 410 480} box ENGRAVED_BOX resizable
+  } {
+    Fl_Table grid_products {
+      dirty_name grid_products open
+      xywh {205 10 395 405} resizable
+      class Fl_Data_Table
+    } {}
+    Fl_Button btnProducts1 {
+      label {@4->}
+      dirty_name btnProducts1
+      xywh {210 425 75 55} labelfont 1 labelsize 40
+    }
+    Fl_Button btnProducts2 {
+      label {@8->}
+      dirty_name btnProducts2
+      xywh {295 425 75 55} labelfont 1 labelsize 40
+    }
+    Fl_Button btnProducts3 {
+      label {@2->}
+      dirty_name btnProducts3
+      xywh {440 425 75 55} labelfont 1 labelsize 40
+    }
+    Fl_Button btnProducts4 {
+      label {@->}
+      dirty_name btnProducts4
+      xywh {525 425 75 55} labelfont 1 labelsize 40
+    }
+  }
+  Fl_Group groupActions {
+    dirty_name groupActions open
+    xywh {615 5 180 550} box ENGRAVED_BOX
+  } {
+    Fl_Button btnOptions11 {
+      label 11
+      dirty_name btnOptions11
+      xywh {620 510 170 40} labelfont 1 labelsize 16
+    }
+    Fl_Output calcDisplay {
+      dirty_name calcDisplay
+      xywh {620 149 170 31} labeltype NO_LABEL labelfont 1 labelsize 16 textfont 1 textsize 20
+    }
+    Fl_Button btnCalc9 {
+      label 9
+      dirty_name btnCalc9
+      xywh {740 185 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc8 {
+      label 8
+      dirty_name btnCalc8
+      xywh {680 185 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc7 {
+      label 7
+      dirty_name btnCalc7
+      xywh {620 185 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc6 {
+      label 6
+      dirty_name btnCalc6
+      xywh {740 245 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc5 {
+      label 5
+      dirty_name btnCalc5
+      xywh {680 245 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc4 {
+      label 4
+      dirty_name btnCalc4
+      xywh {620 245 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc3 {
+      label 3
+      dirty_name btnCalc3
+      xywh {740 305 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc2 {
+      label 2
+      dirty_name btnCalc2
+      xywh {680 305 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc1 {
+      label 1
+      dirty_name btnCalc1
+      xywh {620 305 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalc0 {
+      label 0
+      dirty_name btnCalc0
+      xywh {620 365 50 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnCalcOk {
+      label OK
+      dirty_name btnCalcOk
+      xywh {680 365 110 50} labelfont 1 labelsize 42
+    }
+    Fl_Button btnOptions1 {
+      label 1
+      dirty_name btnOptions1
+      xywh {620 10 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions2 {
+      label 2
+      dirty_name btnOptions2
+      xywh {710 10 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions3 {
+      label 3
+      dirty_name btnOptions3
+      xywh {620 55 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions4 {
+      label 4
+      dirty_name btnOptions4
+      xywh {710 55 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions5 {
+      label 5
+      dirty_name btnOptions5
+      xywh {620 100 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions6 {
+      label 6
+      dirty_name btnOptions6
+      xywh {710 100 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions9 {
+      label 9
+      dirty_name btnOptions9
+      xywh {620 465 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions10 {
+      label 10
+      dirty_name btnOptions10
+      xywh {710 465 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions7 {
+      label 7
+      dirty_name btnOptions7
+      xywh {620 425 80 35} labelfont 1 labelsize 16
+    }
+    Fl_Button btnOptions8 {
+      label 8
+      dirty_name btnOptions8
+      xywh {710 425 80 35} labelfont 1 labelsize 16
+    }
+  }
+  Fl_Group groupShortCuts {
+    dirty_name groupShortCuts open
+    xywh {200 490 410 65} box ENGRAVED_BOX
+  } {
+    Fl_Button btnShortcut1 {
+      label User
+      dirty_name btnShortcut1
+      xywh {205 495 75 55} labelfont 1 labelsize 16
+    }
+    Fl_Button btnShortcut2 {
+      label User
+      dirty_name btnShortcut2
+      xywh {285 495 75 55} labelfont 1 labelsize 16
+    }
+    Fl_Button btnShortcut3 {
+      label User
+      dirty_name btnShortcut3
+      xywh {368 495 75 55} labelfont 1 labelsize 16
+    }
+    Fl_Button btnShortcut4 {
+      label User
+      dirty_name btnShortcut4
+      xywh {450 495 75 55} labelfont 1 labelsize 16
+    }
+    Fl_Button btnShortcut5 {
+      label User
+      dirty_name btnShortcut5
+      xywh {530 495 75 55} labelfont 1 labelsize 16
+    }
+  }
+} 
+
+widget_class MainWindow {
+  label OURBIZ
+  xywh {10 50 330 320} type Double labelsize 16 hide
+  class Base_Window
+} {
+  Fl_Tabs tabs {
+    dirty_name tabs open
+    xywh {5 5 320 310} selection_color 4 labelsize 16 labelcolor 7
+  } {
+    Fl_Group tabSales {
+      label Sales
+      dirty_name tabSales open
+      xywh {5 35 320 280} color 127 labelsize 16
+    } {
+      Fl_Button btnOrdersSales {
+        label Sales
+        dirty_name btnOrdersSales
+        xywh {30 50 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8 align 16
+      }
+      Fl_Button btnPaymentsSales {
+        label Payments
+        dirty_name btnPaymentsSales
+        xywh {30 116 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+      Fl_Button btnEntitiesSales {
+        label Customers
+        xywh {30 183 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+      Fl_Button btnProductsSales {
+        label Products
+        xywh {30 250 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+    }
+    Fl_Group tabBuys {
+      label Buys open
+      xywh {5 35 320 280} color 174 labelsize 16 hide
+    } {
+      Fl_Button btnOrdersBuys {
+        label Buys
+        dirty_name btnOrdersBuys
+        xywh {30 50 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8 align 16
+      }
+      Fl_Button btnPaymentsBuys {
+        label Payments
+        dirty_name btnPaymentsBuys
+        xywh {30 115 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+      Fl_Button btnProductsBuys {
+        label Products
+        xywh {30 250 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+      Fl_Button btnEntitiesBuys {
+        label Suppliers
+        xywh {30 183 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+    }
+    Fl_Group tabAll {
+      label All
+      dirty_name tabAll open
+      xywh {5 35 320 280} color 239 labelsize 16 hide resizable
+    } {
+      Fl_Button btnOrders {
+        label Orders
+        dirty_name btnOrders
+        xywh {30 50 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8 align 16
+      }
+      Fl_Button btnPayments {
+        label Payments
+        dirty_name btnPayments
+        xywh {30 116 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+      Fl_Button btnEntities {
+        label Entities
+        dirty_name btnEntities
+        xywh {30 183 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+      Fl_Button btnProducts {
+        label Products
+        dirty_name btnProducts
+        xywh {30 250 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+    }
+    Fl_Group tabGL {
+      label GL
+      dirty_name tabGL open
+      xywh {5 35 320 280} color 132 labelsize 16 hide
+    } {
+      Fl_Button btnGLGroups {
+        label Groups
+        dirty_name btnGLGroups
+        xywh {30 50 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8 align 16
+      }
+      Fl_Button btnGLChart {
+        label Chart
+        dirty_name btnGLChart
+        xywh {30 115 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+      Fl_Button btnGLTransactions {
+        label Transactions
+        dirty_name btnGLTransactions
+        xywh {30 180 275 55} labeltype SHADOW_LABEL labelfont 3 labelsize 34 labelcolor 8
+      }
+    }
+    Fl_Group tabConfig {
+      label Config open
+      xywh {5 35 320 280} labelsize 16 hide
+    } {
+      Fl_Scroll config_scroll {open
+        xywh {10 45 310 265} labelsize 16
+      } {
+        Fl_Pack config_pack {open
+          xywh {30 45 270 260} labelsize 16
+          code0 {o->spacing(5);}
+        } {
+          Fl_Button btnOrdersSum {
+            label {Orders Sum}
+            dirty_name btnOrdersSum
+            xywh {65 55 64 30} labelsize 16
+          }
+          Fl_Button btnSalesTaxRates {
+            label {Sales Tax Rates}
+            dirty_name btnSalesTaxRates
+            xywh {55 45 64 30} labelsize 16
+          }
+          Fl_Button btnOrderTypes {
+            label {Order Types}
+            dirty_name btnOrderTypes
+            xywh {65 80 64 30} labelsize 16
+          }
+          Fl_Button btnPaymentTypes {
+            label {Payment Types}
+            dirty_name btnPaymentTypes
+            xywh {105 148 64 30} labelsize 16
+          }
+          Fl_Button btnMeasureUnits {
+            label {Measure Units}
+            dirty_name btnMeasureUnits
+            xywh {115 158 64 30} labelsize 16
+          }
+          Fl_Button btnWarrantyTypes {
+            label {Warranty Types}
+            dirty_name btnWarrantyTypes
+            xywh {125 168 64 30} labelsize 16
+          }
+          Fl_Button btnImages {
+            label Images
+            dirty_name btnImages
+            xywh {75 118 64 30} labelsize 16
+          }
+          Fl_Button btnProductGroups {
+            label {Product Groups}
+            dirty_name btnProductGroups
+            xywh {85 128 64 30} labelsize 16
+          }
+          Fl_Button btnEntityGroups {
+            label {Entity Groups}
+            dirty_name btnEntityGroups
+            xywh {95 138 64 30} labelsize 16
+          }
+          Fl_Button btnConfig {
+            label {App Config}
+            dirty_name btnConfig
+            xywh {105 148 64 30} labelsize 16
+          }
+          Fl_Button btnOpenDB {
+            label {Open Database}
+            dirty_name btnOpenDB
+            tooltip {Open a database file} xywh {115 158 64 30} labelsize 16
+          }
+          Fl_Button btnTranslations {
+            label Translations
+            dirty_name btnTranslations
+            xywh {115 158 64 30} labelsize 16
+          }
+          Fl_Button btnAppUsers {
+            label {App Users}
+            dirty_name btnAppUsers
+            xywh {75 65 64 30} labelsize 16
+          }
+          Fl_Check_Button btnAskForPrinter {
+            label {Ask for Printer}
+            dirty_name btnAskForPrinter
+            xywh {55 70 64 15} down_box DOWN_BOX
+          }
+          Fl_Check_Button btnWebServer {
+            label {Web Server}
+            dirty_name btnWebServer
+            xywh {65 80 64 15} down_box DOWN_BOX
+          }
+        }
+      }
+    }
+  }
+} 

+ 6830 - 0
SquiLu-ourbiz/ourbiz-gui.nut

@@ -0,0 +1,6830 @@
+class HelpWindow extends Base_Window {
+  
+  // Declaration of class members
+  tabs = null;
+  tabView = null;
+  view_html = null;
+  tabEdit = null;
+  help_text = null;
+  words_to_search = null;
+  btnSearchHelp = null;
+  btnSavehelp = null;
+  btnBackward = null;
+  btnTop = null;
+  btnForward = null;
+  btnFontSmaller = null;
+  btnFontBigger = null;
+  
+  constructor(px=76, py=128, pw=600, ph=400, pl=_tr("Help")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Tabs(5, 5, 590, 355);
+      tabs = o;
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Group(5, 30, 590, 330, _tr("View"));
+          tabView = o;
+          {
+            {
+              local o = Fl_Help_View(5, 30, 590, 330);
+              view_html = o;
+              o.labelsize(16);
+              o.end();
+            }
+          }
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Group(5, 30, 590, 310, _tr("Edit"));
+          tabEdit = o;
+          {
+            {
+              local o = Fl_Text_Editor_Buffered(5, 30, 590, 310);
+              help_text = o;
+              o.textsize(18);
+              o.labelsize(18);
+              Fl_Group.current().resizable(o);
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 370, 590, 25);
+      {
+        {
+          local o = Fl_Input(34, 370, 225, 25, _tr("@search"));
+          words_to_search = o;
+          o.textsize(18);
+          o.labelsize(18);
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Button(265, 370, 80, 25, _tr("Search"));
+          btnSearchHelp = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(350, 370, 80, 25, _tr("Save"));
+          btnSavehelp = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(435, 370, 25, 25, _tr("@<-"));
+          btnBackward = o;
+          o.labelcolor(63);
+        }
+        {
+          local o = Fl_Button(470, 370, 25, 25, _tr("@8->"));
+          btnTop = o;
+          o.labelcolor(63);
+        }
+        {
+          local o = Fl_Button(503, 370, 25, 25, _tr("@->"));
+          btnForward = o;
+          o.labelcolor(63);
+        }
+        {
+          local o = Fl_Button(536, 370, 25, 25, _tr("F"));
+          btnFontSmaller = o;
+          o.labelfont(1);
+          o.labelsize(10);
+        }
+        {
+          local o = Fl_Button(569, 370, 25, 25, _tr("F"));
+          btnFontBigger = o;
+          o.labelfont(1);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class CalendarWindow extends Base_Window {
+  
+  // Declaration of class members
+  label_month = null;
+  btnMonth1 = null;
+  btnMonth2 = null;
+  btnMonth3 = null;
+  btnMonth4 = null;
+  btnMonth5 = null;
+  btnMonth6 = null;
+  btnMonth7 = null;
+  btnMonth8 = null;
+  btnMonth9 = null;
+  btnMonth10 = null;
+  btnMonth11 = null;
+  btnMonth12 = null;
+  calendar_table = null;
+  btnPrevYear = null;
+  btnPrevMonth = null;
+  btnToday = null;
+  btnSelect = null;
+  btnNextMonth = null;
+  btnNextYear = null;
+  
+  constructor(px=732, py=184, pw=350, ph=305, pl=_tr("Calendar")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Box(5, 5, 340, 25, _tr("Calendar"));
+      label_month = o;
+      o.labelsize(16);
+      o.box(FL_ENGRAVED_BOX);
+      o.color(7);
+    }
+    {
+      local o = Fl_Group(6, 35, 340, 25);
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Button(6, 35, 25, 25, _tr("1"));
+          btnMonth1 = o;
+        }
+        {
+          local o = Fl_Button(34, 35, 25, 25, _tr("2"));
+          btnMonth2 = o;
+        }
+        {
+          local o = Fl_Button(63, 35, 25, 25, _tr("3"));
+          btnMonth3 = o;
+        }
+        {
+          local o = Fl_Button(91, 35, 25, 25, _tr("4"));
+          btnMonth4 = o;
+        }
+        {
+          local o = Fl_Button(120, 35, 25, 25, _tr("5"));
+          btnMonth5 = o;
+        }
+        {
+          local o = Fl_Button(148, 35, 25, 25, _tr("6"));
+          btnMonth6 = o;
+        }
+        {
+          local o = Fl_Button(177, 35, 25, 25, _tr("7"));
+          btnMonth7 = o;
+        }
+        {
+          local o = Fl_Button(205, 35, 25, 25, _tr("8"));
+          btnMonth8 = o;
+        }
+        {
+          local o = Fl_Button(234, 35, 25, 25, _tr("9"));
+          btnMonth9 = o;
+        }
+        {
+          local o = Fl_Button(262, 35, 25, 25, _tr("10"));
+          btnMonth10 = o;
+        }
+        {
+          local o = Fl_Button(291, 35, 25, 25, _tr("11"));
+          btnMonth11 = o;
+        }
+        {
+          local o = Fl_Button(320, 35, 25, 25, _tr("12"));
+          btnMonth12 = o;
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Virtual_Table(5, 65, 340, 202);
+      calendar_table = o;
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+    }
+    {
+      local o = Fl_Group(5, 275, 340, 25);
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Repeat_Button(5, 275, 50, 25, _tr("@<<"));
+          btnPrevYear = o;
+          o.labelsize(16);
+          o.tooltip(_tr("Go to previous year"));
+        }
+        {
+          local o = Fl_Repeat_Button(63, 275, 50, 25, _tr("@<"));
+          btnPrevMonth = o;
+          o.labelsize(16);
+          o.tooltip(_tr("Go to previous month"));
+        }
+        {
+          local o = Fl_Button(121, 275, 50, 25, _tr("@<->"));
+          btnToday = o;
+          o.labelsize(16);
+          o.tooltip(_tr("Go to today date"));
+        }
+        {
+          local o = Fl_Button(179, 275, 50, 25, _tr("@circle"));
+          btnSelect = o;
+          o.labelsize(16);
+          o.tooltip(_tr("Select current date"));
+        }
+        {
+          local o = Fl_Repeat_Button(237, 275, 50, 25, _tr("@>"));
+          btnNextMonth = o;
+          o.labelsize(16);
+          o.tooltip(_tr("Go to next month"));
+        }
+        {
+          local o = Fl_Repeat_Button(295, 275, 50, 25, _tr("@>>"));
+          btnNextYear = o;
+          o.labelsize(16);
+          o.tooltip(_tr("Go to next year"));
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class DeliveryCalcWindow extends Base_Window {
+  
+  // Declaration of class members
+  gui_destination_zone = null;
+  gui_destination_city = null;
+  gui_weight = null;
+  gui_cost = null;
+  gui_discount = null;
+  gui_subtotal = null;
+  gui_insurance = null;
+  gui_increment = null;
+  gui_total = null;
+  gui_btnCalc = null;
+  gui_btnAdd = null;
+  
+  constructor(px=338, py=167, pw=415, ph=285, pl=_tr("Delivery Calc")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Flu_Combo_List(10, 25, 395, 25, _tr("Destination Zone"));
+      gui_destination_zone = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+    }
+    {
+      local o = Flu_Combo_List(10, 80, 395, 25, _tr("Destination City"));
+      gui_destination_city = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Float_Input(10, 132, 100, 25, _tr("Weight"));
+      gui_weight = o;
+      o.textsize(16);
+      o.align(5);
+      o.textfont(1);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Output(130, 133, 130, 24, _tr("Cost"));
+      gui_cost = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      o->right_to_left(1);
+      o->use_numeric_format(1);
+    }
+    {
+      local o = Fl_Output(276, 131, 130, 24, _tr("Discount"));
+      gui_discount = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      o->right_to_left(1);
+      o->use_numeric_format(1);
+    }
+    {
+      local o = Fl_Output(130, 185, 130, 24, _tr("Subtotal"));
+      gui_subtotal = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      o->right_to_left(1);
+      o->use_numeric_format(1);
+    }
+    {
+      local o = Fl_Output(275, 181, 130, 24, _tr("Insurance"));
+      gui_insurance = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      o->right_to_left(1);
+      o->use_numeric_format(1);
+    }
+    {
+      local o = Fl_Output(276, 219, 130, 24, _tr("Increment"));
+      gui_increment = o;
+      o.textsize(16);
+      o.labelsize(16);
+      o->right_to_left(1);
+      o->use_numeric_format(1);
+    }
+    {
+      local o = Fl_Output(276, 253, 130, 24, _tr("Total"));
+      gui_total = o;
+      o.textsize(16);
+      o.textfont(1);
+      o.labelsize(16);
+      o->right_to_left(1);
+      o->use_numeric_format(1);
+    }
+    {
+      local o = Fl_Button(10, 217, 100, 25, _tr("Calc"));
+      gui_btnCalc = o;
+      o.labelsize(16);
+      o.tooltip(_tr("Calculate the delivery price"));
+    }
+    {
+      local o = Fl_Button(10, 252, 100, 25, _tr("Add"));
+      gui_btnAdd = o;
+      o.labelsize(16);
+      o.tooltip(_tr("Add the calculated value on the invoice line"));
+    }
+  }
+}
+
+class ListSearchWindow extends Base_Window {
+  
+  // Declaration of class members
+  topGroup = null;
+  group_filter = null;
+  query_limit = null;
+  btnNotes = null;
+  middleGroup = null;
+  grid = null;
+  bottomGroup = null;
+  pack_search_options = null;
+  search_str = null;
+  btnSearch = null;
+  btnSelect = null;
+  btnUpdate = null;
+  btnInsert = null;
+  btnThumbImage = null;
+  pack_search_options2 = null;
+  
+  constructor(px=132, py=118, pw=800, ph=560, pl=_tr("List Search")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Group(0, 0, 800, 35);
+      topGroup = o;
+      o.labelsize(16);
+      {
+        {
+          local o = Flu_Combo_List(5, 5, 675, 25);
+          group_filter = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Int_Input(690, 6, 60, 25);
+          query_limit = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.labelsize(16);
+          o->value("50");
+        }
+        {
+          local o = Fl_Button(760, 6, 35, 25, _tr("?"));
+          btnNotes = o;
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Group(0, 41, 800, 409);
+      middleGroup = o;
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Data_Table(5, 41, 790, 389);
+          grid = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.labelsize(16);
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+      }
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(4, 440, 790, 115);
+      bottomGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.color(246);
+      {
+        {
+          local o = Fl_Pack(14, 450, 320, 25);
+          pack_search_options = o;
+          o.type(1);
+          o.labelsize(16);
+          o->spacing(10);
+          o.end();
+        }
+        {
+          local o = Fl_Input(35, 485, 299, 25, _tr("@search"));
+          search_str = o;
+          o.textsize(16);
+          o.when(8);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(345, 485, 100, 25, _tr("Search"));
+          btnSearch = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(14, 520, 100, 25, _tr("Select"));
+          btnSelect = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(124, 520, 100, 25, _tr("Update"));
+          btnUpdate = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(234, 520, 100, 25, _tr("Insert"));
+          btnInsert = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Image_Box(663, 445, 125, 105);
+          btnThumbImage = o;
+          o.box(FL_NO_BOX);
+          o.align(80);
+        }
+        {
+          local o = Fl_Box(650, 445, 5, 105);
+          o.align(80);
+          o.labeltype(FL_NO_LABEL);
+          o.labelsize(16);
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Pack(345, 520, 300, 25);
+          pack_search_options2 = o;
+          o.type(1);
+          o.labelsize(16);
+          o->spacing(10);
+          o.end();
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class BarChartGroup extends Fl_Group {
+  
+  // Declaration of class members
+  pack = null;
+  btnShowChart = null;
+  periodes_to_show = null;
+  btn_periode_is_years = null;
+  btn_periode_is_months = null;
+  btn_periode_is_weeks = null;
+  btn_periode_is_days = null;
+  chkOpt = null;
+  bar_chart = null;
+  
+  constructor(px=288, py=260, pw=760, ph=460, pl=_tr("BarChartGroup")){
+    base.constructor(px, py, pw, ph, pl);
+    local _x = 288, _y = 260;
+    // Create member functions and widgets
+    {
+      local o = Fl_Pack(_x + 0, _y + 0, 760, 25);
+      pack = o;
+      o.type(1);
+      o.labelsize(16);
+      o->spacing(10);
+      {
+        {
+          local o = Fl_Button(_x + 0, _y + 0, 96, 25, _tr("Show"));
+          btnShowChart = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Int_Input(_x + 106, _y + 0, 80, 25);
+          periodes_to_show = o;
+          o.textsize(16);
+          o.labelsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.tooltip(_tr("Write then number of periodes you want to see"));
+          o->value("12");
+        }
+        {
+          local o = Fl_Round_Button(_x + 196, _y + 0, 110, 25, _tr("Years"));
+          btn_periode_is_years = o;
+          o.labelsize(16);
+          o.type(102);
+          o.down_box(FL_ROUND_DOWN_BOX);
+        }
+        {
+          local o = Fl_Round_Button(_x + 316, _y + 0, 110, 25, _tr("Months"));
+          btn_periode_is_months = o;
+          o.labelsize(16);
+          o.type(102);
+          o.down_box(FL_ROUND_DOWN_BOX);
+          o->setonly();
+        }
+        {
+          local o = Fl_Round_Button(_x + 436, _y + 0, 110, 25, _tr("Weeks"));
+          btn_periode_is_weeks = o;
+          o.labelsize(16);
+          o.type(102);
+          o.down_box(FL_ROUND_DOWN_BOX);
+        }
+        {
+          local o = Fl_Round_Button(_x + 556, _y + 0, 110, 25, _tr("Days"));
+          btn_periode_is_days = o;
+          o.labelsize(16);
+          o.type(102);
+          o.down_box(FL_ROUND_DOWN_BOX);
+        }
+        {
+          local o = Fl_Check_Button(_x + 660, _y + 5, 64, 15);
+          chkOpt = o;
+          o.down_box(FL_DOWN_BOX);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Bar_Chart(_x + 0, _y + 30, 760, 430);
+      bar_chart = o;
+      o.align(5);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.color(7);
+      #include "Fl_Bar_Chart.h"
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class HistoryGroup extends Fl_Group {
+  
+  // Declaration of class members
+  history_choice = null;
+  history_query_limit = null;
+  btnViewDocHsitory = null;
+  grid_history = null;
+  
+  constructor(px=13, py=33, pw=760, ph=465, pl=_tr("History")){
+    base.constructor(px, py, pw, ph, pl);
+    local _x = 13, _y = 33;
+    // Create member functions and widgets
+    {
+      local o = Fl_Pack(_x + 0, _y + 0, 760, 25);
+      o.type(1);
+      o.labelsize(16);
+      o->spacing(10);
+      {
+        {
+          local o = Fl_Choice(_x + 0, _y + 0, 564, 25);
+          history_choice = o;
+          o.textsize(16);
+          o.labelsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Int_Input(_x + 574, _y + 0, 80, 25);
+          history_query_limit = o;
+          o.textsize(16);
+          o.labelsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.tooltip(_tr("Write then number of periodes you want to see"));
+          o->value("50");
+        }
+        {
+          local o = Fl_Button(_x + 664, _y + 0, 96, 25, _tr("View Doc."));
+          btnViewDocHsitory = o;
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Data_Table(_x + 0, _y + 33, 760, 432);
+      grid_history = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class BaseReportA4 extends Fl_Window {
+  
+  // Declaration of class members
+  rpt_Logo = null;
+  rpt_Title = null;
+  rpt_SubTitle = null;
+  rpt_Body = null;
+  rpt_SubFooter = null;
+  rpt_Footer = null;
+  
+  constructor(px=178, py=95, pw=420, ph=590, pl=_tr("BaseReportA4")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Box(10, 5, 105, 35, _tr("Ourbiz"));
+      rpt_Logo = o;
+      o.align(660);
+      o.labelfont(3);
+      o.labeltype(FL_SHADOW_LABEL);
+      o.labelsize(30);
+    }
+    {
+      local o = Fl_Box(120, 5, 295, 20, _tr("Report Title"));
+      rpt_Title = o;
+      o.labelfont(1);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Box(120, 30, 290, 10, _tr("Date"));
+      rpt_SubTitle = o;
+      o.align(24);
+      o.labelsize(8);
+    }
+    {
+      local o = Fl_Box(10, 40, 405, 1, _tr("Line"));
+      o.box(FL_FLAT_BOX);
+      o.labeltype(FL_NO_LABEL);
+      o.color(34);
+    }
+    {
+      local o = Fl_Data_Table(10, 45, 408, 495);
+      rpt_Body = o;
+      o.textsize(8);
+      o.labelsize(8);
+      o->has_scrollbar(FLVS_NONE);
+      o->feature_remove(FLVF_ROW_SELECT | FLVF_PERSIST_SELECT);
+      o->for_print(true);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Box(10, 545, 405, 1, _tr("Line"));
+      o.box(FL_FLAT_BOX);
+      o.labeltype(FL_NO_LABEL);
+      o.color(34);
+    }
+    {
+      local o = Fl_Box(10, 547, 405, 10, _tr("Page"));
+      rpt_SubFooter = o;
+      o.labelfont(1);
+      o.align(16);
+      o.labelsize(8);
+    }
+    {
+      local o = Fl_Box(10, 560, 405, 19, _tr("OURBIZ is an excelente application to manage a business."));
+      rpt_Footer = o;
+      o.labelfont(2);
+      o.align(145);
+      o.labelsize(8);
+    }
+  }
+}
+
+class PrintPreviewGroup extends Fl_Group {
+  
+  // Declaration of class members
+  btnRefresh = null;
+  btnPrinter = null;
+  btnPrint = null;
+  chkOnlyData = null;
+  chkA4 = null;
+  iNumCopies = null;
+  brwPages = null;
+  PreviewScroll = null;
+  
+  constructor(px=181, py=165, pw=770, ph=440, pl=_tr("Print Preview")){
+    base.constructor(px, py, pw, ph, pl);
+    local _x = 181, _y = 165;
+    // Create member functions and widgets
+    {
+      local o = Fl_Group(_x + 0, _y + 0, 80, 440);
+      {
+        {
+          local o = Fl_Button(_x + 0, _y + 5, 80, 25, _tr("Refresh"));
+          btnRefresh = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(_x + 0, _y + 35, 80, 25, _tr("Printer"));
+          btnPrinter = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(_x + 0, _y + 65, 80, 25, _tr("Print"));
+          btnPrint = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Check_Button(_x + 30, _y + 118, 20, 25, _tr("Only Data"));
+          chkOnlyData = o;
+          o.align(1);
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+        }
+        {
+          local o = Fl_Check_Button(_x + 30, _y + 165, 20, 25, _tr("A4"));
+          chkA4 = o;
+          o.align(1);
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+        }
+        {
+          local o = Fl_Int_Input(_x + 10, _y + 211, 56, 24, _tr("Copies"));
+          iNumCopies = o;
+          o.textsize(16);
+          o.align(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Hold_Browser(_x + 5, _y + 260, 70, 180, _tr("Pages"));
+          brwPages = o;
+          o.textsize(16);
+          o.align(1);
+          o.labelsize(16);
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = OrderPageGroup(_x + 90, _y + 0, 680, 440);
+      PreviewScroll = o;
+      o.box(FL_ENGRAVED_FRAME);
+      o.color(7);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class OrderPageGroup extends Fl_Scroll {
+  
+  // Declaration of class members
+  page = null;
+  pageDesignGroup = null;
+  logoGroupH = null;
+  logoH = null;
+  companyBoxH = null;
+  logoGroupV = null;
+  logoV = null;
+  companyBoxV = null;
+  logoGroupHV = null;
+  logoHV1 = null;
+  logoHV2 = null;
+  companyBoxHV = null;
+  OrderNumber = null;
+  box_header_number_date = null;
+  box_data_number_date = null;
+  header_date_box = null;
+  box_data_date_box = null;
+  box_to = null;
+  orderLines = null;
+  header_lines_code_box = null;
+  header_lines_description_box = null;
+  header_lines_quantity_box = null;
+  header_lines_price_box = null;
+  header_lines_discount_box = null;
+  header_lines_sales_tax1_box = null;
+  header_lines_sales_tax2_box = null;
+  header_lines_subtotal_box = null;
+  designLinesGroup = null;
+  data_lines_code_box = null;
+  data_lines_description_box = null;
+  data_lines_quantity_box = null;
+  data_tlines_price_box = null;
+  data_lines_discount_box = null;
+  data_lines_sales_tax1_box = null;
+  data_lines_sales_tax2_box = null;
+  data_lines_subtotal_box = null;
+  orderTotals = null;
+  header_PAGENO_box = null;
+  box_data_pageno_box = null;
+  header_totals_subtotal_box = null;
+  data_totals_subtotal_box = null;
+  header_totals_total_sales_tax1_box = null;
+  data_totals_total_sales_tax1_box = null;
+  header_totals_total_sales_tax2_box = null;
+  data_totals_total_sales_tax2_box = null;
+  header_totals_total_box = null;
+  data_totals_total_box = null;
+  notes_box = null;
+  printDataGroup = null;
+  orderTypeBox = null;
+  numberBox = null;
+  dateBox = null;
+  entityBox = null;
+  dataLinesGroup = null;
+  codeBox = null;
+  descriptionBox = null;
+  quantityBox = null;
+  priceBox = null;
+  discountBox = null;
+  sales_tax1Box = null;
+  sales_tax2Box = null;
+  lineTotalBox = null;
+  bottomTotals = null;
+  orderPageBox = null;
+  fisrtTotalBox = null;
+  sales_tax1AmountBox = null;
+  sales_tax2AmountBox = null;
+  totalBox = null;
+  
+  constructor(px=213, py=39, pw=630, ph=685, pl=_tr("InvoiceA4")){
+    base.constructor(px, py, pw, ph, pl);
+    local _x = 213, _y = 39;
+    // Create member functions and widgets
+    {
+      local o = Fl_Group(_x + 0, _y + 0, 634, 686);
+      page = o;
+      o.color(7);
+      {
+        {
+          local o = Fl_Group(_x + 2, _y + 0, 630, 686);
+          pageDesignGroup = o;
+          o.labeltype(FL_NO_LABEL);
+          {
+            {
+              local o = Fl_Group(_x + 15, _y + 10, 316, 130);
+              logoGroupH = o;
+              {
+                {
+                  local o = Fl_Box(_x + 16, _y + 10, 310, 50, _tr("FLTK"));
+                  logoH = o;
+                  o.align(660);
+                  o.labelfont(3);
+                  o.labeltype(FL_SHADOW_LABEL);
+                  o.labelsize(40);
+                }
+                {
+                  local o = Fl_Box(_x + 16, _y + 65, 308, 75);
+                  companyBoxH = o;
+                  o.labelfont(2);
+                  o.align(144);
+                  o.labelsize(10);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Group(_x + 15, _y + 10, 316, 130);
+              logoGroupV = o;
+              {
+                {
+                  local o = Fl_Box(_x + 16, _y + 10, 100, 130, _tr("FLTK"));
+                  logoV = o;
+                  o.align(660);
+                  o.labelfont(3);
+                  o.labeltype(FL_SHADOW_LABEL);
+                  o.labelsize(40);
+                }
+                {
+                  local o = Fl_Box(_x + 120, _y + 10, 210, 130);
+                  companyBoxV = o;
+                  o.labelfont(2);
+                  o.align(144);
+                  o.labelsize(10);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Group(_x + 15, _y + 10, 316, 130);
+              logoGroupHV = o;
+              {
+                {
+                  local o = Fl_Box(_x + 16, _y + 10, 100, 130, _tr("FLTK"));
+                  logoHV1 = o;
+                  o.align(660);
+                  o.labelfont(3);
+                  o.labeltype(FL_SHADOW_LABEL);
+                  o.labelsize(40);
+                }
+                {
+                  local o = Fl_Box(_x + 120, _y + 10, 210, 50, _tr("FLTK"));
+                  logoHV2 = o;
+                  o.align(660);
+                  o.labelfont(3);
+                  o.labeltype(FL_SHADOW_LABEL);
+                  o.labelsize(40);
+                }
+                {
+                  local o = Fl_Box(_x + 120, _y + 50, 210, 90);
+                  companyBoxHV = o;
+                  o.labelfont(2);
+                  o.align(144);
+                  o.labelsize(9);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Group(_x + 336, _y + 10, 286, 40);
+              OrderNumber = o;
+              o.box(FL_FLAT_BOX);
+              o.color(39);
+              o.labeltype(FL_NO_LABEL);
+              {
+                {
+                  local o = Fl_Box(_x + 337, _y + 11, 142, 18);
+                  box_header_number_date = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 337, _y + 30, 142, 19);
+                  box_data_number_date = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(7);
+                }
+                {
+                  local o = Fl_Box(_x + 480, _y + 11, 141, 18, _tr("DATE"));
+                  header_date_box = o;
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 480, _y + 30, 141, 19);
+                  box_data_date_box = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(7);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Box(_x + 336, _y + 55, 286, 85);
+              box_to = o;
+              o.box(FL_BORDER_FRAME);
+              o.align(21);
+              o.labelfont(1);
+              o.labelsize(16);
+              o.color(39);
+            }
+            {
+              local o = Fl_Group(_x + 16, _y + 148, 606, 433);
+              orderLines = o;
+              o.box(FL_FLAT_BOX);
+              o.color(39);
+              o.labeltype(FL_NO_LABEL);
+              {
+                {
+                  local o = Fl_Box(_x + 17, _y + 149, 46, 20, _tr("CODE"));
+                  header_lines_code_box = o;
+                  o.labelsize(10);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 64, _y + 149, 300, 20, _tr("DESCRIPTION"));
+                  header_lines_description_box = o;
+                  o.labelsize(10);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 365, _y + 149, 40, 20, _tr("QTY."));
+                  header_lines_quantity_box = o;
+                  o.labelsize(10);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 406, _y + 149, 60, 20, _tr("PRICE"));
+                  header_lines_price_box = o;
+                  o.labelsize(10);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 467, _y + 149, 30, 20, _tr("DISC. %"));
+                  header_lines_discount_box = o;
+                  o.align(128);
+                  o.labelsize(8);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 498, _y + 149, 30, 20, _tr("S.T. I %"));
+                  header_lines_sales_tax1_box = o;
+                  o.align(128);
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(8);
+                  o.color(47);
+                  o.labelfont(1);
+                }
+                {
+                  local o = Fl_Box(_x + 529, _y + 149, 30, 20, _tr("S.T. II %"));
+                  header_lines_sales_tax2_box = o;
+                  o.align(128);
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(8);
+                  o.color(47);
+                  o.labelfont(1);
+                }
+                {
+                  local o = Fl_Box(_x + 560, _y + 149, 61, 20, _tr("SUBTOTAL"));
+                  header_lines_subtotal_box = o;
+                  o.labelsize(10);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Group(_x + 17, _y + 170, 604, 410);
+                  designLinesGroup = o;
+                  o.labeltype(FL_NO_LABEL);
+                  {
+                    {
+                      local o = Fl_Box(_x + 17, _y + 170, 46, 410);
+                      data_lines_code_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                    {
+                      local o = Fl_Box(_x + 64, _y + 170, 300, 410);
+                      data_lines_description_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                    {
+                      local o = Fl_Box(_x + 365, _y + 170, 40, 410);
+                      data_lines_quantity_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                    {
+                      local o = Fl_Box(_x + 406, _y + 170, 60, 410);
+                      data_tlines_price_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                    {
+                      local o = Fl_Box(_x + 467, _y + 170, 30, 410);
+                      data_lines_discount_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                    {
+                      local o = Fl_Box(_x + 498, _y + 170, 30, 410);
+                      data_lines_sales_tax1_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                    {
+                      local o = Fl_Box(_x + 529, _y + 170, 30, 410);
+                      data_lines_sales_tax2_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                    {
+                      local o = Fl_Box(_x + 560, _y + 170, 61, 410);
+                      data_lines_subtotal_box = o;
+                      o.box(FL_FLAT_BOX);
+                      o.labelsize(10);
+                      o.labelfont(1);
+                      o.labeltype(FL_NO_LABEL);
+                      o.color(7);
+                    }
+                  }
+                  o.end();
+                  Fl_Group.current().resizable(o);
+                }
+              }
+              o.end();
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Group(_x + 16, _y + 585, 606, 46);
+              orderTotals = o;
+              o.box(FL_FLAT_BOX);
+              o.color(39);
+              o.labeltype(FL_NO_LABEL);
+              {
+                {
+                  local o = Fl_Box(_x + 17, _y + 586, 65, 20, _tr("PAGE"));
+                  header_PAGENO_box = o;
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 17, _y + 607, 65, 23);
+                  box_data_pageno_box = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(7);
+                }
+                {
+                  local o = Fl_Box(_x + 83, _y + 586, 150, 20, _tr("SUBTOTAL"));
+                  header_totals_subtotal_box = o;
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 83, _y + 607, 150, 23);
+                  data_totals_subtotal_box = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(7);
+                }
+                {
+                  local o = Fl_Box(_x + 234, _y + 586, 120, 20, _tr("Sales Tax I"));
+                  header_totals_total_sales_tax1_box = o;
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.color(47);
+                  o.box(FL_FLAT_BOX);
+                }
+                {
+                  local o = Fl_Box(_x + 234, _y + 607, 120, 23);
+                  data_totals_total_sales_tax1_box = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(7);
+                }
+                {
+                  local o = Fl_Box(_x + 355, _y + 586, 115, 20, _tr("Sales Tax II"));
+                  header_totals_total_sales_tax2_box = o;
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.color(47);
+                  o.box(FL_FLAT_BOX);
+                }
+                {
+                  local o = Fl_Box(_x + 355, _y + 607, 115, 23);
+                  data_totals_total_sales_tax2_box = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(7);
+                }
+                {
+                  local o = Fl_Box(_x + 471, _y + 586, 150, 20, _tr("TOTAL"));
+                  header_totals_total_box = o;
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.box(FL_FLAT_BOX);
+                  o.color(47);
+                }
+                {
+                  local o = Fl_Box(_x + 471, _y + 607, 150, 23);
+                  data_totals_total_box = o;
+                  o.box(FL_FLAT_BOX);
+                  o.labelsize(12);
+                  o.labelfont(1);
+                  o.labeltype(FL_NO_LABEL);
+                  o.color(7);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Box(_x + 17, _y + 638, 606, 37);
+              notes_box = o;
+              o.labelfont(2);
+              o.align(144);
+              o.labelsize(9);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(_x + 3, _y + 0, 628, 637);
+          printDataGroup = o;
+          o.labeltype(FL_NO_LABEL);
+          {
+            {
+              local o = Fl_Box(_x + 338, _y + 10, 139, 20);
+              orderTypeBox = o;
+              o.labelfont(1);
+              o.labelsize(12);
+            }
+            {
+              local o = Fl_Box(_x + 338, _y + 33, 139, 16);
+              numberBox = o;
+              o.labelfont(5);
+              o.labelsize(15);
+              o.align(16);
+            }
+            {
+              local o = Fl_Box(_x + 484, _y + 32, 133, 16);
+              dateBox = o;
+              o.labelfont(5);
+              o.labelsize(15);
+              o.align(16);
+            }
+            {
+              local o = Fl_Box(_x + 338, _y + 57, 282, 82);
+              entityBox = o;
+              o.align(85);
+              o.labelsize(12);
+            }
+            {
+              local o = Fl_Group(_x + 16, _y + 169, 605, 412);
+              dataLinesGroup = o;
+              o.align(16);
+              o.labeltype(FL_NO_LABEL);
+              {
+                {
+                  local o = Fl_Box(_x + 16, _y + 174, 46, 404);
+                  codeBox = o;
+                  o.align(25);
+                  o.labelsize(11);
+                }
+                {
+                  local o = Fl_Box(_x + 64, _y + 174, 300, 404);
+                  descriptionBox = o;
+                  o.align(85);
+                  o.labelsize(11);
+                }
+                {
+                  local o = Fl_Box(_x + 365, _y + 174, 40, 404);
+                  quantityBox = o;
+                  o.align(25);
+                  o.labelsize(11);
+                }
+                {
+                  local o = Fl_Box(_x + 406, _y + 174, 60, 404);
+                  priceBox = o;
+                  o.align(25);
+                  o.labelsize(11);
+                }
+                {
+                  local o = Fl_Box(_x + 467, _y + 174, 30, 404);
+                  discountBox = o;
+                  o.align(25);
+                  o.labelsize(11);
+                }
+                {
+                  local o = Fl_Box(_x + 498, _y + 174, 30, 404);
+                  sales_tax1Box = o;
+                  o.align(25);
+                  o.labelsize(11);
+                }
+                {
+                  local o = Fl_Box(_x + 529, _y + 174, 30, 404);
+                  sales_tax2Box = o;
+                  o.align(25);
+                  o.labelsize(11);
+                }
+                {
+                  local o = Fl_Box(_x + 560, _y + 174, 61, 404);
+                  lineTotalBox = o;
+                  o.align(25);
+                  o.labelsize(11);
+                }
+              }
+              o.end();
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Group(_x + 16, _y + 585, 605, 48);
+              bottomTotals = o;
+              o.labeltype(FL_NO_LABEL);
+              {
+                {
+                  local o = Fl_Box(_x + 16, _y + 608, 65, 25);
+                  orderPageBox = o;
+                  o.labelfont(5);
+                  o.labelsize(15);
+                }
+                {
+                  local o = Fl_Box(_x + 83, _y + 608, 150, 25);
+                  fisrtTotalBox = o;
+                  o.labelfont(5);
+                  o.labelsize(15);
+                }
+                {
+                  local o = Fl_Box(_x + 234, _y + 608, 120, 25);
+                  sales_tax1AmountBox = o;
+                  o.labelfont(5);
+                  o.labelsize(15);
+                }
+                {
+                  local o = Fl_Box(_x + 355, _y + 608, 115, 25);
+                  sales_tax2AmountBox = o;
+                  o.labelfont(5);
+                  o.labelsize(15);
+                }
+                {
+                  local o = Fl_Box(_x + 500, _y + 608, 121, 25);
+                  totalBox = o;
+                  o.labelfont(5);
+                  o.labelsize(15);
+                }
+              }
+              o.end();
+            }
+          }
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class ProductPricesGroup extends Fl_Group {
+  
+  // Declaration of class members
+  grid = null;
+  db_product_prices_quantity = null;
+  db_product_prices_markup_pct = null;
+  db_product_prices_discount_pct = null;
+  db_product_prices_price = null;
+  btnDbAction = null;
+  dbAction = null;
+  
+  constructor(px=48, py=153, pw=760, ph=220, pl=_tr("Product Prices by Quantity")){
+    base.constructor(px, py, pw, ph, pl);
+    local _x = 48, _y = 153;
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(_x + 5, _y + 5, 750, 155, _tr("Prices by Quantity"));
+      grid = o;
+      o.textsize(16);
+      o.align(1);
+      o.labelsize(16);
+      o.end();
+    }
+    {
+      local o = Fl_Float_Input(_x + 5, _y + 185, 100, 25, _tr("Quantity"));
+      db_product_prices_quantity = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      o->decimal_places(-6);
+    }
+    {
+      local o = Fl_Float_Input(_x + 115, _y + 185, 108, 25, _tr("Markup %"));
+      db_product_prices_markup_pct = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      //o->decimal_places(-6);
+    }
+    {
+      local o = Fl_Float_Input(_x + 233, _y + 185, 108, 25, _tr("Discount %"));
+      db_product_prices_discount_pct = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      //o->decimal_places(-6);
+    }
+    {
+      local o = Fl_Float_Input(_x + 351, _y + 185, 108, 25, _tr("Price"));
+      db_product_prices_price = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Button(_x + 469, _y + 185, 105, 25, _tr("Save"));
+      btnDbAction = o;
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Choice_dbAction(_x + 590, _y + 185, 105, 25, _tr("Action"));
+      dbAction = o;
+      o.textsize(16);
+      o.align(1);
+      o.down_box(FL_BORDER_BOX);
+      o.labelsize(16);
+    }
+  }
+}
+
+class ProductKitGroup extends Fl_Group {
+  
+  // Declaration of class members
+  grid = null;
+  kit_group_search_edit = null;
+  grpSearchEdit = null;
+  db_product_kits_product_id = null;
+  db_product_kits_sell_description = null;
+  btnSearchProduct = null;
+  db_product_kits_quantity = null;
+  db_product_kits_product_price = null;
+  btnDbAction = null;
+  dbAction = null;
+  btnKitPartOf = null;
+  kit_group_totals = null;
+  kit_sales_price = null;
+  kit_prices_sum = null;
+  kit_parts = null;
+  kit_markup = null;
+  
+  constructor(px=24, py=106, pw=775, ph=470, pl=_tr("ProductKitGroup")){
+    base.constructor(px, py, pw, ph, pl);
+    local _x = 24, _y = 106;
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(_x + 4, _y + 1, 770, 328);
+      grid = o;
+      o.textsize(16);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(_x + 0, _y + 355, 540, 115, _tr("Search / Edit"));
+      kit_group_search_edit = o;
+      o.labelsize(16);
+      o.color(166);
+      o.box(FL_UP_BOX);
+      {
+        {
+          local o = Fl_Group(_x + 10, _y + 365, 525, 93);
+          grpSearchEdit = o;
+          {
+            {
+              local o = Fl_Int_Input(_x + 12, _y + 382, 87, 25, _tr("Code"));
+              db_product_kits_product_id = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Input(_x + 109, _y + 382, 426, 25, _tr("Description"));
+              db_product_kits_sell_description = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Button(_x + 445, _y + 433, 90, 25, _tr("Search"));
+              btnSearchProduct = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Float_Input(_x + 10, _y + 433, 89, 25, _tr("Quantity"));
+              db_product_kits_quantity = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Float_Input(_x + 109, _y + 433, 108, 25, _tr("Price"));
+              db_product_kits_product_price = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Button(_x + 225, _y + 433, 100, 25, _tr("Save"));
+              btnDbAction = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Choice_dbAction(_x + 335, _y + 433, 100, 25, _tr("Action"));
+              dbAction = o;
+              o.textsize(16);
+              o.align(1);
+              o.down_box(FL_BORDER_BOX);
+              o.labelsize(16);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Check_Button(_x + 430, _y + 360, 100, 25, _tr("Part of"));
+          btnKitPartOf = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Group(_x + 544, _y + 355, 230, 115, _tr("Totals"));
+      kit_group_totals = o;
+      o.labelsize(16);
+      o.color(166);
+      o.box(FL_UP_BOX);
+      {
+        {
+          local o = Fl_Float_Input(_x + 664, _y + 433, 100, 25, _tr("Price"));
+          kit_sales_price = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Float_Input(_x + 664, _y + 380, 100, 25, _tr("Prices Sum"));
+          kit_prices_sum = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Int_Input(_x + 554, _y + 380, 100, 25, _tr("Parts"));
+          kit_parts = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Float_Input(_x + 554, _y + 433, 100, 25, _tr("Markup %"));
+          kit_markup = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class AskLoginWindow extends Fl_Double_Window {
+  
+  // Declaration of class members
+  host = null;
+  port = null;
+  user = null;
+  password = null;
+  btnConnect = null;
+  
+  constructor(px=246, py=157, pw=500, ph=120, pl=_tr("Server Login")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Input(10, 30, 405, 25, _tr("Host"));
+      host = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      o->value("localhost");
+    }
+    {
+      local o = Fl_Int_Input(425, 30, 65, 25, _tr("Port"));
+      port = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      o->value("8888");
+    }
+    {
+      local o = Fl_Input(10, 85, 170, 25, _tr("User"));
+      user = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Secret_Input(200, 85, 170, 25, _tr("Password"));
+      password = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Return_Button(385, 85, 106, 25, _tr("Connect"));
+      btnConnect = o;
+    }
+  }
+}
+
+class AppUsersEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_app_users_id = null;
+  db_app_users_cdate = null;
+  db_app_users_mdate = null;
+  db_app_users_is_active = null;
+  db_app_users_user_name = null;
+  db_app_users_password1 = null;
+  db_app_users_password2 = null;
+  db_app_users_name = null;
+  dbAction = null;
+  btnDbAction = null;
+  db_app_users_rights = null;
+  db_app_users_notes = null;
+  
+  constructor(px=282, py=148, pw=500, ph=500, pl=_tr("App Users List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 490, 140);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 148, 489, 347);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 173, 82, 26, _tr("ID"));
+          db_app_users_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "id", db_app_users_id);
+        }
+        {
+          local o = Fl_Output(115, 173, 120, 25, _tr("CDate"));
+          db_app_users_cdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "cdate", db_app_users_cdate);
+        }
+        {
+          local o = Fl_Output(255, 173, 120, 25, _tr("MDate"));
+          db_app_users_mdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "mdate", db_app_users_mdate);
+        }
+        {
+          local o = Fl_Check_Button(385, 175, 100, 23, _tr("Active"));
+          db_app_users_is_active = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+          add_input_field_to_map("app_users", "is_active", db_app_users_is_active);
+        }
+        {
+          local o = Fl_Input(15, 225, 140, 25, _tr("UserName"));
+          db_app_users_user_name = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "user_name", db_app_users_user_name);
+        }
+        {
+          local o = Fl_Secret_Input(180, 225, 140, 25, _tr("Password"));
+          db_app_users_password1 = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "password1", db_app_users_password1);
+        }
+        {
+          local o = Fl_Secret_Input(345, 225, 140, 25, _tr("Repite Password"));
+          db_app_users_password2 = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "password2", db_app_users_password2);
+        }
+        {
+          local o = Fl_Input(15, 275, 470, 25, _tr("Name"));
+          db_app_users_name = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "name", db_app_users_name);
+        }
+        {
+          local o = Fl_Choice_dbAction(380, 428, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 463, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Text_Editor_Buffered(15, 325, 470, 55, _tr("Rights"));
+          db_app_users_rights = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "rights", db_app_users_rights);
+        }
+        {
+          local o = Fl_Text_Editor_Buffered(15, 398, 360, 90, _tr("Notes"));
+          db_app_users_notes = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("app_users", "notes", db_app_users_notes);
+        }
+        {
+          local o = Fl_Check_Button(380, 398, 105, 25, _tr("Wrap lines"));
+          o.labelsize(16);
+          o.value(1);
+          o.down_box(FL_DOWN_BOX);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class AppConfigEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_config_id = null;
+  db_config_cdate = null;
+  db_config_mdate = null;
+  db_config_is_active = null;
+  db_config_key = null;
+  db_config_value = null;
+  dbAction = null;
+  btnDbAction = null;
+  db_config_notes = null;
+  
+  constructor(px=346, py=83, pw=500, ph=490, pl=_tr("Application Configuration List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 490, 200);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 215, 490, 269);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 240, 82, 26, _tr("ID"));
+          db_config_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("config", "id", db_config_id);
+        }
+        {
+          local o = Fl_Output(115, 240, 120, 25, _tr("CDate"));
+          db_config_cdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("config", "cdate", db_config_cdate);
+        }
+        {
+          local o = Fl_Output(255, 240, 120, 25, _tr("MDate"));
+          db_config_mdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("config", "mdate", db_config_mdate);
+        }
+        {
+          local o = Fl_Check_Button(385, 242, 100, 23, _tr("Active"));
+          db_config_is_active = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+          add_input_field_to_map("config", "is_active", db_config_is_active);
+        }
+        {
+          local o = Fl_Input(15, 292, 350, 25, _tr("Key"));
+          db_config_key = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("config", "key", db_config_key);
+        }
+        {
+          local o = Fl_Input(15, 345, 350, 25, _tr("Value"));
+          db_config_value = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("config", "value", db_config_value);
+        }
+        {
+          local o = Fl_Choice_dbAction(380, 310, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 345, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Multiline_Input(15, 398, 470, 76, _tr("Notes"));
+          db_config_notes = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("config", "notes", db_config_notes);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class TanslationsWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  myTabs = null;
+  tabLanguages = null;
+  grid_languages = null;
+  db_languages_lang = null;
+  db_languages_date_format = null;
+  db_languages_name = null;
+  db_languages_native_name = null;
+  db_languages_decimal_sep = null;
+  db_languages_thousand_sep = null;
+  tabTranslations = null;
+  grid_translations = null;
+  db_translations_language = null;
+  db_translations_values_svalue = null;
+  btnTransSearch = null;
+  btnTransClear = null;
+  dbAction = null;
+  btnDbAction = null;
+  
+  constructor(px=217, py=76, pw=490, ph=560, pl=_tr("Translations")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Tabs(5, 10, 482, 505);
+      myTabs = o;
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Group(5, 40, 480, 475, _tr("Languages"));
+          tabLanguages = o;
+          o.labelsize(16);
+          {
+            {
+              local o = Fl_Data_Table(21, 55, 456, 215);
+              grid_languages = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o.end();
+            }
+            {
+              local o = Fl_Input(20, 295, 75, 25, _tr("Code"));
+              db_languages_lang = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Input(366, 295, 110, 25, _tr("Date format"));
+              db_languages_date_format = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Input(20, 345, 456, 25, _tr("Name"));
+              db_languages_name = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Input(20, 395, 456, 25, _tr("Native Name"));
+              db_languages_native_name = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Input(205, 430, 35, 40, _tr("Separators -> Decimal"));
+              db_languages_decimal_sep = o;
+              o.textsize(40);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Input(345, 430, 35, 40, _tr("Thousand"));
+              db_languages_thousand_sep = o;
+              o.textsize(40);
+              o.labelsize(16);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 40, 480, 475, _tr("Translations"));
+          tabTranslations = o;
+          o.labelsize(16);
+          {
+            {
+              local o = Fl_Data_Table(16, 55, 461, 180);
+              grid_translations = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o.end();
+            }
+            {
+              local o = Fl_Choice_Int(16, 260, 461, 30, _tr("Language"));
+              db_translations_language = o;
+              o.textsize(16);
+              o.align(5);
+              o.down_box(FL_BORDER_BOX);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Multiline_Input(16, 315, 461, 160, _tr("Content"));
+              db_translations_values_svalue = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Button(301, 480, 80, 25, _tr("Sea&rch"));
+              btnTransSearch = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Button(396, 480, 80, 25, _tr("Cl&ear"));
+              btnTransClear = o;
+              o.labelsize(16);
+              o.callback(function(sender, udata){
+                db_translations_values_svalue->value("");
+              });
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Choice_dbAction(26, 525, 105, 25);
+      dbAction = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.down_box(FL_BORDER_BOX);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Button(151, 525, 105, 25, _tr("Action"));
+      btnDbAction = o;
+      o.labelsize(16);
+    }
+  }
+}
+
+class PaymentTypesEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_payment_types_id = null;
+  db_payment_types_cdate = null;
+  db_payment_types_mdate = null;
+  db_payment_types_is_active = null;
+  db_payment_types_code = null;
+  db_payment_types_description = null;
+  npayments = null;
+  payment_periodes = null;
+  btnGenerateTerms = null;
+  dbAction = null;
+  btnDbAction = null;
+  db_payment_types_payment_terms = null;
+  db_payment_types_notes = null;
+  
+  constructor(px=302, py=168, pw=500, ph=500, pl=_tr("Payment Types List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 490, 140);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 148, 489, 347);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 173, 82, 26, _tr("ID"));
+          db_payment_types_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("payment_types", "id", db_payment_types_id);
+        }
+        {
+          local o = Fl_Output(115, 173, 120, 25, _tr("CDate"));
+          db_payment_types_cdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("payment_types", "cdate", db_payment_types_cdate);
+        }
+        {
+          local o = Fl_Output(255, 173, 120, 25, _tr("MDate"));
+          db_payment_types_mdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("payment_types", "mdate", db_payment_types_mdate);
+        }
+        {
+          local o = Fl_Check_Button(385, 175, 100, 23, _tr("Active"));
+          db_payment_types_is_active = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+          add_input_field_to_map("payment_types", "is_active", db_payment_types_is_active);
+        }
+        {
+          local o = Fl_Input(15, 225, 82, 25, _tr("Code"));
+          db_payment_types_code = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("payment_types", "code", db_payment_types_code);
+        }
+        {
+          local o = Fl_Input(105, 225, 380, 25, _tr("Description"));
+          db_payment_types_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("payment_types", "description", db_payment_types_description);
+        }
+        {
+          local o = Fl_Int_Input(380, 275, 105, 25, _tr("# Payments"));
+          npayments = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Choice(380, 320, 105, 25, _tr("Periodes"));
+          payment_periodes = o;
+          o.textsize(16);
+          o.align(5);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 355, 105, 25, _tr("Generate"));
+          btnGenerateTerms = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Choice_dbAction(380, 428, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 463, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Text_Editor_Buffered(15, 275, 360, 105, _tr("Terms (#  %  after  periode)"));
+          db_payment_types_payment_terms = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("payment_types", "payment_terms", db_payment_types_payment_terms);
+        }
+        {
+          local o = Fl_Text_Editor_Buffered(15, 398, 360, 90, _tr("Notes"));
+          db_payment_types_notes = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("payment_types", "notes", db_payment_types_notes);
+        }
+        {
+          local o = Fl_Check_Button(380, 398, 105, 25, _tr("Wrap lines"));
+          o.labelsize(16);
+          o.value(1);
+          o.down_box(FL_DOWN_BOX);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class WarrantyTypesEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_warranty_types_id = null;
+  db_warranty_types_cdate = null;
+  db_warranty_types_mdate = null;
+  db_warranty_types_code = null;
+  db_warranty_types_is_active = null;
+  db_warranty_types_description = null;
+  dbAction = null;
+  btnDbAction = null;
+  
+  constructor(px=219, py=105, pw=500, ph=385, pl=_tr("Warranty Types List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 490, 200);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 215, 490, 165);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 240, 82, 26, _tr("ID"));
+          db_warranty_types_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("warranty_types", "id", db_warranty_types_id);
+        }
+        {
+          local o = Fl_Output(115, 240, 120, 25, _tr("CDate"));
+          db_warranty_types_cdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("warranty_types", "cdate", db_warranty_types_cdate);
+        }
+        {
+          local o = Fl_Output(255, 240, 120, 25, _tr("MDate"));
+          db_warranty_types_mdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("warranty_types", "mdate", db_warranty_types_mdate);
+        }
+        {
+          local o = Fl_Input(15, 295, 82, 25, _tr("Code"));
+          db_warranty_types_code = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("warranty_types", "code", db_warranty_types_code);
+        }
+        {
+          local o = Fl_Check_Button(385, 242, 100, 23, _tr("Active"));
+          db_warranty_types_is_active = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+          add_input_field_to_map("warranty_types", "is_active", db_warranty_types_is_active);
+        }
+        {
+          local o = Fl_Input(15, 345, 360, 25, _tr("Description"));
+          db_warranty_types_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("warranty_types", "description", db_warranty_types_description);
+        }
+        {
+          local o = Fl_Choice_dbAction(380, 310, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 345, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class MeasureUnitsEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_measure_units_id = null;
+  db_measure_units_cdate = null;
+  db_measure_units_mdate = null;
+  db_measure_units_code = null;
+  db_measure_units_is_active = null;
+  db_measure_units_description = null;
+  dbAction = null;
+  btnDbAction = null;
+  
+  constructor(px=286, py=134, pw=500, ph=385, pl=_tr("Measure Units List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 490, 200);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 215, 490, 165);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 240, 82, 26, _tr("ID"));
+          db_measure_units_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("measure_units", "id", db_measure_units_id);
+        }
+        {
+          local o = Fl_Output(115, 240, 120, 25, _tr("CDate"));
+          db_measure_units_cdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("measure_units", "cdate", db_measure_units_cdate);
+        }
+        {
+          local o = Fl_Output(255, 240, 120, 25, _tr("MDate"));
+          db_measure_units_mdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("measure_units", "mdate", db_measure_units_mdate);
+        }
+        {
+          local o = Fl_Input(15, 295, 82, 25, _tr("Code"));
+          db_measure_units_code = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("measure_units", "code", db_measure_units_code);
+        }
+        {
+          local o = Fl_Check_Button(385, 242, 100, 23, _tr("Active"));
+          db_measure_units_is_active = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+          add_input_field_to_map("measure_units", "is_active", db_measure_units_is_active);
+        }
+        {
+          local o = Fl_Input(15, 345, 360, 25, _tr("Description"));
+          db_measure_units_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("measure_units", "description", db_measure_units_description);
+        }
+        {
+          local o = Fl_Choice_dbAction(380, 310, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 345, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class SalesTaxRatesEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_sales_tax_rates_id = null;
+  db_sales_tax_rates_cdate = null;
+  db_sales_tax_rates_mdate = null;
+  db_sales_tax_rates_rate1 = null;
+  db_sales_tax_rates_rate2 = null;
+  db_sales_tax_rates_is_active = null;
+  db_sales_tax_rates_description = null;
+  dbAction = null;
+  btnDbAction = null;
+  
+  constructor(px=266, py=87, pw=500, ph=385, pl=_tr("Sales Tax Rates List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 490, 200);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.tooltip(_tr("List of available sales tax"));
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 215, 490, 165);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 240, 82, 26, _tr("ID"));
+          db_sales_tax_rates_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.tooltip(_tr("The unique identifier"));
+          o.labelsize(16);
+          add_input_field_to_map("sales_tax_rates", "id", db_sales_tax_rates_id);
+        }
+        {
+          local o = Fl_Output(115, 240, 120, 25, _tr("CDate"));
+          db_sales_tax_rates_cdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.tooltip(_tr("The creation date"));
+          o.labelsize(16);
+          add_input_field_to_map("sales_tax_rates", "cdate", db_sales_tax_rates_cdate);
+        }
+        {
+          local o = Fl_Output(255, 240, 120, 25, _tr("MDate"));
+          db_sales_tax_rates_mdate = o;
+          o.textsize(16);
+          o.align(5);
+          o.tooltip(_tr("The modification date"));
+          o.labelsize(16);
+          add_input_field_to_map("sales_tax_rates", "mdate", db_sales_tax_rates_mdate);
+        }
+        {
+          local o = Fl_Float_Input(15, 295, 82, 25, _tr("V.A.T. %"));
+          db_sales_tax_rates_rate1 = o;
+          o.textsize(16);
+          o.align(5);
+          o.tooltip(_tr("Main sales tax percentage"));
+          o.labelsize(16);
+          o.textfont(1);
+          add_input_field_to_map("sales_tax_rates", "rate1", db_sales_tax_rates_rate1);
+        }
+        {
+          local o = Fl_Float_Input(115, 295, 82, 25, _tr("R.E. %"));
+          db_sales_tax_rates_rate2 = o;
+          o.textsize(16);
+          o.align(5);
+          o.tooltip(_tr("Secondary sales tax percentage"));
+          o.labelsize(16);
+          o.textfont(1);
+          add_input_field_to_map("sales_tax_rates", "rate2", db_sales_tax_rates_rate2);
+        }
+        {
+          local o = Fl_Check_Button(255, 294, 100, 23, _tr("Active"));
+          db_sales_tax_rates_is_active = o;
+          o.down_box(FL_DOWN_BOX);
+          o.labelsize(16);
+          o.tooltip(_tr("We can deactivate instead of delete it"));
+          add_input_field_to_map("sales_tax_rates", "is_active", db_sales_tax_rates_is_active);
+        }
+        {
+          local o = Fl_Input(15, 345, 350, 25, _tr("Description"));
+          db_sales_tax_rates_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          o.tooltip(_tr("A friendly description to identify this tax"));
+          add_input_field_to_map("sales_tax_rates", "description", db_sales_tax_rates_description);
+        }
+        {
+          local o = Fl_Choice_dbAction(380, 310, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 345, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class OrderTypesEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_order_types_code = null;
+  db_order_types_description_to_print = null;
+  db_order_types_series = null;
+  db_order_types_numbering = null;
+  db_order_types_group_order = null;
+  db_order_types_subgroup_order = null;
+  pack = null;
+  db_order_types_is_active = null;
+  db_order_types_with_sales_tax = null;
+  db_order_types_with_sales_tax_included = null;
+  db_order_types_show_sales_tax = null;
+  db_order_types_show_prices = null;
+  db_order_types_description = null;
+  db_order_types_with_payment = null;
+  db_order_types_with_inventory = null;
+  db_order_types_with_order = null;
+  db_order_types_with_credit = null;
+  db_order_types_is_incoming = null;
+  db_order_types_is_expense = null;
+  dbAction = null;
+  btnDbAction = null;
+  db_order_types_notes = null;
+  db_order_types_id = null;
+  db_order_types_with_quote = null;
+  db_order_types_with_invoice = null;
+  db_order_types_with_lost = null;
+  
+  constructor(px=100, py=110, pw=800, ph=535, pl=_tr("Order Types List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 790, 200);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 210, 790, 320);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Input(103, 233, 82, 25, _tr("Code"));
+          db_order_types_code = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "code", db_order_types_code);
+        }
+        {
+          local o = Fl_Input(195, 233, 225, 25, _tr("Description to print"));
+          db_order_types_description_to_print = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "description_to_print", db_order_types_description_to_print);
+        }
+        {
+          local o = Fl_Input(430, 233, 82, 25, _tr("Series"));
+          db_order_types_series = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "series", db_order_types_series);
+        }
+        {
+          local o = Fl_Int_Input(522, 233, 98, 25, _tr("Number"));
+          db_order_types_numbering = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "numbering", db_order_types_numbering);
+        }
+        {
+          local o = Fl_Input(630, 233, 70, 25, _tr("Grp 1"));
+          db_order_types_group_order = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "group_order", db_order_types_group_order);
+        }
+        {
+          local o = Fl_Input(710, 233, 75, 25, _tr("Grp 2"));
+          db_order_types_subgroup_order = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "subgroup_order", db_order_types_subgroup_order);
+        }
+        {
+          local o = Fl_Pack(15, 266, 770, 29);
+          pack = o;
+          o.type(1);
+          o.labelsize(16);
+          o->with_label(1);
+          o->spacing(10);
+          {
+            {
+              local o = Fl_Check_Button(20, 270, 78, 25, _tr("Active"));
+              db_order_types_is_active = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("order_types", "is_active", db_order_types_is_active);
+            }
+            {
+              local o = Fl_Check_Button(100, 270, 100, 25, _tr("With V.A.T."));
+              db_order_types_with_sales_tax = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("order_types", "with_sales_tax", db_order_types_with_sales_tax);
+            }
+            {
+              local o = Fl_Check_Button(220, 270, 100, 25, _tr("V.A.T. Included"));
+              db_order_types_with_sales_tax_included = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("order_types", "with_sales_tax_included", db_order_types_with_sales_tax_included);
+            }
+            {
+              local o = Fl_Check_Button(365, 270, 100, 25, _tr("Show V.A.T."));
+              db_order_types_show_sales_tax = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("order_types", "show_sales_tax", db_order_types_show_sales_tax);
+            }
+            {
+              local o = Fl_Check_Button(490, 270, 100, 25, _tr("Show prices"));
+              db_order_types_show_prices = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("order_types", "show_prices", db_order_types_show_prices);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Input(15, 315, 385, 25, _tr("Description"));
+          db_order_types_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "description", db_order_types_description);
+        }
+        {
+          local o = Fl_Input(425, 435, 30, 25, _tr("Payment"));
+          db_order_types_with_payment = o;
+          o.textsize(24);
+          o.align(8);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "with_payment", db_order_types_with_payment);
+        }
+        {
+          local o = Fl_Input(425, 375, 30, 25, _tr("Inventory"));
+          db_order_types_with_inventory = o;
+          o.textsize(24);
+          o.align(8);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "with_inventory", db_order_types_with_inventory);
+        }
+        {
+          local o = Fl_Input(425, 345, 30, 25, _tr("Order"));
+          db_order_types_with_order = o;
+          o.textsize(24);
+          o.align(8);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "with_order", db_order_types_with_order);
+        }
+        {
+          local o = Fl_Input(425, 465, 30, 25, _tr("Credit"));
+          db_order_types_with_credit = o;
+          o.textsize(24);
+          o.align(8);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "with_credit", db_order_types_with_credit);
+        }
+        {
+          local o = Fl_Check_Button(655, 350, 125, 25, _tr("Income"));
+          db_order_types_is_incoming = o;
+          o.down_box(FL_DOWN_BOX);
+          o.labelsize(16);
+          o.type(102);
+          add_input_field_to_map("order_types", "is_incoming", db_order_types_is_incoming);
+        }
+        {
+          local o = Fl_Check_Button(655, 315, 125, 25, _tr("Expense"));
+          db_order_types_is_expense = o;
+          o.down_box(FL_DOWN_BOX);
+          o.labelsize(16);
+          o.type(102);
+          add_input_field_to_map("order_types", "is_expense", db_order_types_is_expense);
+        }
+        {
+          local o = Fl_Choice_dbAction(679, 385, 106, 28);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(681, 424, 104, 28, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Multiline_Input(15, 362, 385, 158, _tr("Notes"));
+          db_order_types_notes = o;
+          o.textsize(16);
+          o.align(5);
+          o.when(8);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "notes", db_order_types_notes);
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Output(15, 233, 78, 25, _tr("ID"));
+          db_order_types_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "id", db_order_types_id);
+        }
+        {
+          local o = Fl_Input(425, 315, 30, 25, _tr("Quote"));
+          db_order_types_with_quote = o;
+          o.textsize(24);
+          o.align(8);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "with_quote", db_order_types_with_quote);
+        }
+        {
+          local o = Fl_Input(425, 405, 30, 25, _tr("Invoice"));
+          db_order_types_with_invoice = o;
+          o.textsize(24);
+          o.align(8);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "with_invoice", db_order_types_with_invoice);
+        }
+        {
+          local o = Fl_Input(425, 495, 30, 25, _tr("Lost"));
+          db_order_types_with_lost = o;
+          o.textsize(24);
+          o.align(8);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("order_types", "with_lost", db_order_types_with_lost);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class ImageWindow extends Base_Window {
+  
+  // Declaration of class members
+  btnImage = null;
+  
+  constructor(px=325, py=355, pw=305, ph=260, pl=_tr("Image")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Image_Box(0, 0, 305, 263);
+      btnImage = o;
+      o.box(FL_NO_BOX);
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class DynamicQueryWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  
+  constructor(px=285, py=319, pw=700, ph=400, pl=_tr("Dynamic Data")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 690, 390);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class ImagesListEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_images_id = null;
+  db_images_name = null;
+  db_images_group_set = null;
+  db_images_mime_type = null;
+  db_images_mdate = null;
+  db_images_cdate = null;
+  btnSearch = null;
+  dbAction = null;
+  btnDbAction = null;
+  db_images_description = null;
+  query_limit = null;
+  img_size = null;
+  btnImage = null;
+  
+  constructor(px=81, py=129, pw=800, ph=560, pl=_tr("Images List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 790, 295);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 305, 790, 250);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Group(15, 315, 435, 232);
+          {
+            {
+              local o = Fl_Output(15, 328, 78, 25, _tr("ID"));
+              db_images_id = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("images", "id", db_images_id);
+            }
+            {
+              local o = Fl_Input(103, 328, 347, 25, _tr("Name"));
+              db_images_name = o;
+              o.textsize(16);
+              o.align(5);
+              o.textfont(1);
+              o.labelsize(16);
+              add_input_field_to_map("images", "name", db_images_name);
+            }
+            {
+              local o = Fl_Int_Input(15, 380, 80, 25, _tr("Group"));
+              db_images_group_set = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("images", "group_set", db_images_group_set);
+            }
+            {
+              local o = Fl_Output(105, 380, 115, 25, _tr("Type"));
+              db_images_mime_type = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("images", "mime_type", db_images_mime_type);
+            }
+            {
+              local o = Fl_Output(225, 380, 110, 25, _tr("Update Date"));
+              db_images_mdate = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("images", "mdate", db_images_mdate);
+            }
+            {
+              local o = Fl_Output(338, 380, 110, 25, _tr("Create Date"));
+              db_images_cdate = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("images", "cdate", db_images_cdate);
+            }
+            {
+              local o = Fl_Button(345, 455, 104, 25, _tr("Search"));
+              btnSearch = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Choice_dbAction(343, 487, 106, 28);
+              dbAction = o;
+              o.textsize(16);
+              o.labeltype(FL_NO_LABEL);
+              o.down_box(FL_BORDER_BOX);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Button(345, 519, 104, 28, _tr("Action"));
+              btnDbAction = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Multiline_Input(15, 430, 320, 115, _tr("Notes"));
+              db_images_description = o;
+              o.textsize(16);
+              o.align(5);
+              o.when(8);
+              o.labelsize(16);
+              add_input_field_to_map("images", "description", db_images_description);
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Int_Input(385, 425, 60, 25, _tr("Limit"));
+              query_limit = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->value("50");
+            }
+            {
+              local o = Fl_Box(225, 405, 109, 25, _tr("Size"));
+              img_size = o;
+              o.labelsize(16);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Image_Box(485, 315, 300, 232);
+          btnImage = o;
+          o.box(FL_ENGRAVED_FRAME);
+          o.align(80);
+          Fl_Group.current().resizable(o);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class GroupsListEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  tree = null;
+  bottomGroup = null;
+  db_group_description = null;
+  db_group_parent_id = null;
+  dbAction = null;
+  btnDbAction = null;
+  db_group_id = null;
+  btnWrapNotes = null;
+  db_group_notes = null;
+  
+  constructor(px=328, py=91, pw=800, ph=560, pl=_tr("Groups List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = MyTree_Browser(10, 10, 780, 360);
+      tree = o;
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      //o->showroot(0);
+      //o->select_focus(1);
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(0, 375, 800, 185);
+      bottomGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.color(246);
+      {
+        {
+          local o = Fl_Input(98, 408, 576, 28, _tr("Description"));
+          db_group_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("group", "description", db_group_description);
+        }
+        {
+          local o = Fl_Int_Input(684, 408, 106, 28, _tr("Parent"));
+          db_group_parent_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("group", "parent_id", db_group_parent_id);
+        }
+        {
+          local o = Fl_Choice_dbAction(684, 484, 106, 28);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(686, 522, 104, 28, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Output(10, 408, 78, 28, _tr("ID"));
+          db_group_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("group", "id", db_group_id);
+        }
+        {
+          local o = Fl_Check_Button(95, 440, 115, 25, _tr("Wrap lines"));
+          btnWrapNotes = o;
+          o.labelsize(16);
+          o.value(1);
+          o.down_box(FL_DOWN_BOX);
+        }
+        {
+          local o = MyFl_Text_Editor(10, 462, 660, 88, _tr("Notes"));
+          db_group_notes = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("group", "notes", db_group_notes);
+          Fl_Group.current().resizable(o);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class OrdersSumWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid_orders_sum = null;
+  bottomGroup = null;
+  query_limit = null;
+  search_str = null;
+  btnSearch = null;
+  btnDelete = null;
+  btnCreate = null;
+  orders_sum_detail_type = null;
+  grid_orders_sum_details = null;
+  
+  constructor(px=92, py=155, pw=800, ph=560, pl=_tr("Orders Sum")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 4, 790, 202, _tr("@2 Orders Sum @2"));
+      grid_orders_sum = o;
+      o.textsize(16);
+      o.align(17);
+      o.box(FL_ENGRAVED_BOX);
+      o.color(175);
+      o.labelsize(16);
+      o.end();
+    }
+    {
+      local o = Fl_Group(5, 210, 790, 35);
+      bottomGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.color(246);
+      {
+        {
+          local o = Fl_Int_Input(15, 216, 40, 24);
+          query_limit = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.tooltip(_tr("Limit the amount of records to show"));
+          o.labelsize(16);
+          o->value("50");
+        }
+        {
+          local o = Fl_Input(65, 215, 375, 25);
+          search_str = o;
+          o.textsize(16);
+          o.labelsize(16);
+          o.when(8);
+          o.labeltype(FL_NO_LABEL);
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Button(455, 215, 100, 25, _tr("Search"));
+          btnSearch = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(689, 215, 100, 25, _tr("Delete"));
+          btnDelete = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(574, 215, 100, 25, _tr("Create"));
+          btnCreate = o;
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Group(5, 255, 790, 300);
+      {
+        {
+          local o = Fl_Choice(5, 255, 790, 25);
+          orders_sum_detail_type = o;
+          o.textsize(16);
+          o.labelsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+        }
+        {
+          local o = Fl_Data_Table(5, 288, 790, 267, _tr("@2 Ordes Sum Details @2"));
+          grid_orders_sum_details = o;
+          o.textsize(16);
+          o.align(17);
+          o.box(FL_ENGRAVED_BOX);
+          o.color(175);
+          o.labelsize(16);
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+      }
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class PaymentEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  db_payments_id = null;
+  btnOrderId = null;
+  db_payments_amount = null;
+  db_payments_due_date = null;
+  db_payments_entity_name = null;
+  db_payments_cdate = null;
+  db_payments_notes = null;
+  btnShowClearedCalendar = null;
+  db_payments_cleared_date = null;
+  group_lines = null;
+  grid_lines = null;
+  group_edit_line = null;
+  db_payments_lines_amount = null;
+  btnSaveLine = null;
+  db_payments_lines_notes = null;
+  db_payments_lines_payment_date = null;
+  btnPaymentDateCalendar = null;
+  btnSave = null;
+  btnPrint = null;
+  
+  constructor(px=147, py=111, pw=720, ph=430, pl=_tr("Payment Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Output(85, 5, 100, 25, _tr("Payment #"));
+      db_payments_id = o;
+      o.textsize(16);
+      o.labelsize(16);
+      add_input_field_to_map("payments", "id", db_payments_id);
+    }
+    {
+      local o = Fl_Button(190, 5, 30, 25, _tr("@<->"));
+      btnOrderId = o;
+      o.labelcolor(22);
+      o.labelsize(18);
+      o.tooltip(_tr("Show Associated order if any [order_id]."));
+    }
+    {
+      local o = Fl_Float_Input(330, 5, 110, 25, _tr("Amount"));
+      db_payments_amount = o;
+      o.textsize(16);
+      o.textfont(1);
+      o.labelsize(16);
+      add_input_field_to_map("payments", "amount", db_payments_amount);
+    }
+    {
+      local o = Fl_Input(585, 5, 125, 25, _tr("Due Date"));
+      db_payments_due_date = o;
+      o.textsize(16);
+      o.labelsize(16);
+      o.textfont(1);
+      add_input_field_to_map("payments", "due_date", db_payments_due_date);
+    }
+    {
+      local o = Fl_Input(10, 50, 570, 25, _tr("Entity"));
+      db_payments_entity_name = o;
+      o.textsize(16);
+      o.align(5);
+      o.textfont(1);
+      o.labelsize(16);
+      add_input_field_to_map("payments", "entity_name", db_payments_entity_name);
+    }
+    {
+      local o = Fl_Input(585, 50, 125, 25, _tr("Created"));
+      db_payments_cdate = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      add_input_field_to_map("payments", "cdate", db_payments_cdate);
+    }
+    {
+      local o = Fl_Input(10, 95, 535, 25, _tr("Notes"));
+      db_payments_notes = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      add_input_field_to_map("payments", "notes", db_payments_notes);
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Button(550, 95, 30, 25, _tr("@<->"));
+      btnShowClearedCalendar = o;
+      o.labelcolor(22);
+      o.labelsize(18);
+      o.tooltip(_tr("Show calendar"));
+    }
+    {
+      local o = Fl_Input(585, 95, 125, 25, _tr("Cleared"));
+      db_payments_cleared_date = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      add_input_field_to_map("payments", "cleared_date", db_payments_cleared_date);
+    }
+    {
+      local o = Fl_Group(10, 126, 700, 264);
+      group_lines = o;
+      o.box(FL_THIN_UP_BOX);
+      o.labelsize(16);
+      o.color(246);
+      o.labeltype(FL_NO_LABEL);
+      {
+        {
+          local o = Fl_Data_Table(15, 135, 690, 146);
+          grid_lines = o;
+          o.textsize(16);
+          o.align(5);
+          o.labeltype(FL_NO_LABEL);
+          o.labelsize(16);
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Group(15, 288, 695, 102);
+          group_edit_line = o;
+          o.labeltype(FL_NO_LABEL);
+          {
+            {
+              local o = Fl_Float_Input(15, 360, 125, 25, _tr("Amount"));
+              db_payments_lines_amount = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("payments_lines", "amount", db_payments_lines_amount);
+            }
+            {
+              local o = Fl_Button(340, 360, 110, 25, _tr("Save Line"));
+              btnSaveLine = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Input(15, 310, 690, 25, _tr("Description"));
+              db_payments_lines_notes = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("payments_lines", "notes", db_payments_lines_notes);
+            }
+            {
+              local o = Fl_Input(155, 359, 125, 25, _tr("Date"));
+              db_payments_lines_payment_date = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("payments_lines", "payment_date", db_payments_lines_payment_date);
+            }
+            {
+              local o = Fl_Button(285, 360, 30, 25, _tr("@<->"));
+              btnPaymentDateCalendar = o;
+              o.labelcolor(22);
+              o.labelsize(18);
+              o.tooltip(_tr("Show calendar"));
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Button(495, 400, 105, 25, _tr("Save"));
+      btnSave = o;
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Button(605, 400, 105, 25, _tr("Print"));
+      btnPrint = o;
+      o.labelsize(16);
+    }
+  }
+}
+
+class GLGroupsListEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  grid = null;
+  editGroup = null;
+  db_gl_groups_id = null;
+  db_gl_groups_code = null;
+  db_gl_groups_debit_op = null;
+  db_gl_groups_credit_op = null;
+  db_gl_groups_description = null;
+  dbAction = null;
+  btnDbAction = null;
+  
+  constructor(px=480, py=215, pw=500, ph=352, pl=_tr("GL Groups List / Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Data_Table(5, 5, 490, 200);
+      grid = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(5, 215, 490, 130);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 240, 82, 26, _tr("ID"));
+          db_gl_groups_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_groups", "id", db_gl_groups_id);
+        }
+        {
+          local o = Fl_Input(110, 240, 80, 25, _tr("Code"));
+          db_gl_groups_code = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_groups", "code", db_gl_groups_code);
+        }
+        {
+          local o = Fl_Input(250, 240, 30, 25, _tr("Op. Debit (+/-)"));
+          db_gl_groups_debit_op = o;
+          o.textsize(24);
+          o.align(1);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("gl_groups", "debit_op", db_gl_groups_debit_op);
+        }
+        {
+          local o = Fl_Input(380, 240, 30, 25, _tr("Op.Credit (+/-)"));
+          db_gl_groups_credit_op = o;
+          o.textsize(24);
+          o.align(1);
+          o.textfont(1);
+          o.labelsize(16);
+          add_input_field_to_map("gl_groups", "credit_op", db_gl_groups_credit_op);
+        }
+        {
+          local o = Fl_Input(15, 310, 350, 25, _tr("Description"));
+          db_gl_groups_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_groups", "description", db_gl_groups_description);
+        }
+        {
+          local o = Fl_Choice_dbAction(380, 275, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(380, 310, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class GLChartEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  editGroup = null;
+  db_gl_chart_id = null;
+  db_gl_chart_budget = null;
+  db_gl_chart_is_active = null;
+  db_gl_chart_is_header = null;
+  db_gl_chart_group_code = null;
+  db_gl_chart_gl_group_id = null;
+  db_gl_chart_description = null;
+  dbAction = null;
+  btnDbAction = null;
+  db_gl_chart_notes = null;
+  db_gl_chart_balance = null;
+  
+  constructor(px=253, py=173, pw=600, ph=350, pl=_tr("Accounts Chart Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Group(5, 5, 590, 340);
+      editGroup = o;
+      o.box(FL_ENGRAVED_BOX);
+      o.labelsize(16);
+      o.align(8);
+      o.color(246);
+      {
+        {
+          local o = Fl_Output(15, 30, 130, 26, _tr("ID"));
+          db_gl_chart_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_chart", "id", db_gl_chart_id);
+        }
+        {
+          local o = Fl_Float_Input(155, 30, 150, 25, _tr("Budget"));
+          db_gl_chart_budget = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_chart", "budget", db_gl_chart_budget);
+        }
+        {
+          local o = Fl_Check_Button(480, 22, 100, 23, _tr("Active"));
+          db_gl_chart_is_active = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+          add_input_field_to_map("gl_chart", "is_active", db_gl_chart_is_active);
+        }
+        {
+          local o = Fl_Check_Button(480, 52, 100, 23, _tr("Header"));
+          db_gl_chart_is_header = o;
+          o.labelsize(16);
+          o.down_box(FL_DOWN_BOX);
+          add_input_field_to_map("gl_chart", "is_header", db_gl_chart_is_header);
+        }
+        {
+          local o = Fl_Input(15, 85, 130, 25, _tr("Code"));
+          db_gl_chart_group_code = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_chart", "group_code", db_gl_chart_group_code);
+        }
+        {
+          local o = Fl_Choice_Int(155, 85, 310, 25, _tr("Group"));
+          db_gl_chart_gl_group_id = o;
+          o.textsize(16);
+          o.align(5);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+          add_input_field_to_map("gl_chart", "gl_group_id", db_gl_chart_gl_group_id);
+        }
+        {
+          local o = Fl_Input(15, 135, 450, 25, _tr("Description"));
+          db_gl_chart_description = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_chart", "description", db_gl_chart_description);
+        }
+        {
+          local o = Fl_Choice_dbAction(480, 105, 105, 25);
+          dbAction = o;
+          o.textsize(16);
+          o.labeltype(FL_NO_LABEL);
+          o.down_box(FL_BORDER_BOX);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(480, 135, 105, 25, _tr("Action"));
+          btnDbAction = o;
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Text_Editor_Buffered(15, 190, 570, 150, _tr("Notes"));
+          db_gl_chart_notes = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_chart", "notes", db_gl_chart_notes);
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Check_Button(105, 165, 105, 25, _tr("Wrap lines"));
+          o.align(16);
+          o.labelsize(16);
+          o.value(1);
+          o.down_box(FL_DOWN_BOX);
+          o.callback(function(sender, udata){
+            db_gl_chart_notes->wrap_mode(o->value(), 0);
+          });
+        }
+        {
+          local o = Fl_Float_Input(315, 30, 150, 25, _tr("Balance"));
+          db_gl_chart_balance = o;
+          o.textsize(16);
+          o.align(5);
+          o.labelsize(16);
+          add_input_field_to_map("gl_chart", "balance", db_gl_chart_balance);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class GLTransactionEditWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  db_gl_transactions_description = null;
+  btnOrderId = null;
+  db_gl_transactions_transaction_date = null;
+  btnShowCalendar = null;
+  group_lines = null;
+  grid_lines = null;
+  group_edit_line = null;
+  db_gl_transactions_lines_description = null;
+  db_gl_transactions_lines_group_code = null;
+  btnSearchAccount = null;
+  db_gl_transactions_lines_debit = null;
+  db_gl_transactions_lines_credit = null;
+  btnSaveLine = null;
+  btnBalanceLine = null;
+  btnClearLine = null;
+  db_gl_transactions_lines_gl_code = null;
+  db_gl_transactions_lines_doc = null;
+  db_gl_transactions_lines_due_date = null;
+  btnDueDateCalendar = null;
+  db_gl_transactions_lines_checked_date = null;
+  db_gl_transactions_id = null;
+  dbAction = null;
+  btnDbAction = null;
+  
+  constructor(px=80, py=133, pw=720, ph=410, pl=_tr("GL Transaction Edit")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Input(10, 24, 570, 25, _tr("Description"));
+      db_gl_transactions_description = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      add_input_field_to_map("gl_transactions", "description", db_gl_transactions_description);
+    }
+    {
+      local o = Fl_Button(550, 0, 30, 25, _tr("@<->"));
+      btnOrderId = o;
+      o.labelcolor(22);
+      o.labelsize(18);
+      o.tooltip(_tr("Show Associated order if any [order_id]."));
+    }
+    {
+      local o = Fl_Input(590, 25, 125, 25, _tr("Date"));
+      db_gl_transactions_transaction_date = o;
+      o.textsize(16);
+      o.align(5);
+      o.labelsize(16);
+      add_input_field_to_map("gl_transactions", "transaction_date", db_gl_transactions_transaction_date);
+    }
+    {
+      local o = Fl_Button(680, 0, 30, 25, _tr("@<->"));
+      btnShowCalendar = o;
+      o.labelcolor(22);
+      o.labelsize(18);
+      o.tooltip(_tr("Show calendar"));
+    }
+    {
+      local o = Fl_Group(10, 55, 705, 309);
+      group_lines = o;
+      o.box(FL_THIN_UP_BOX);
+      o.labelsize(16);
+      o.color(246);
+      o.labeltype(FL_NO_LABEL);
+      {
+        {
+          local o = grid_lines;
+          Fl_Group.current()->add(o);
+          o->resize(15, 55, 695, 150);
+          o.textsize(16);
+          o.align(5);
+          o.labeltype(FL_NO_LABEL);
+          o.labelsize(16);
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Group(15, 230, 695, 130);
+          group_edit_line = o;
+          o.labeltype(FL_NO_LABEL);
+          {
+            {
+              local o = Fl_Input(190, 230, 480, 25, _tr("Account"));
+              db_gl_transactions_lines_description = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "description", db_gl_transactions_lines_description);
+            }
+            {
+              local o = Fl_Input(20, 230, 110, 25, _tr("Code"));
+              db_gl_transactions_lines_group_code = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "group_code", db_gl_transactions_lines_group_code);
+            }
+            {
+              local o = Fl_Button(680, 230, 30, 25, _tr("@<->"));
+              btnSearchAccount = o;
+              o.labelcolor(22);
+              o.labelsize(18);
+              o.tooltip(_tr("Show calendar"));
+            }
+            {
+              local o = Fl_Float_Input(485, 280, 110, 25, _tr("Debit"));
+              db_gl_transactions_lines_debit = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "debit", db_gl_transactions_lines_debit);
+            }
+            {
+              local o = Fl_Float_Input(600, 280, 110, 25, _tr("Credit"));
+              db_gl_transactions_lines_credit = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "credit", db_gl_transactions_lines_credit);
+            }
+            {
+              local o = Fl_Button(365, 330, 110, 25, _tr("Save Line"));
+              btnSaveLine = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Button(485, 330, 110, 25, _tr("Balance"));
+              btnBalanceLine = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Button(600, 330, 110, 25, _tr("Clear Line"));
+              btnClearLine = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Output(140, 230, 40, 25, _tr("Grp."));
+              db_gl_transactions_lines_gl_code = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "gl_code", db_gl_transactions_lines_gl_code);
+            }
+            {
+              local o = Fl_Input(20, 280, 455, 25, _tr("Document"));
+              db_gl_transactions_lines_doc = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "doc", db_gl_transactions_lines_doc);
+            }
+            {
+              local o = Fl_Input(20, 330, 125, 25, _tr("Due Date"));
+              db_gl_transactions_lines_due_date = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "due_date", db_gl_transactions_lines_due_date);
+            }
+            {
+              local o = Fl_Button(155, 330, 30, 25, _tr("@<->"));
+              btnDueDateCalendar = o;
+              o.labelcolor(22);
+              o.labelsize(18);
+              o.tooltip(_tr("Show calendar"));
+            }
+            {
+              local o = Fl_Input(195, 330, 125, 25, _tr("Checked Date"));
+              db_gl_transactions_lines_checked_date = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              add_input_field_to_map("gl_transactions_lines", "checked_date", db_gl_transactions_lines_checked_date);
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Output(615, 375, 100, 25, _tr("Transaction #"));
+      db_gl_transactions_id = o;
+      o.textsize(16);
+      o.labelsize(16);
+      add_input_field_to_map("gl_transactions", "id", db_gl_transactions_id);
+    }
+    {
+      local o = Fl_Choice_dbAction(130, 374, 105, 25);
+      dbAction = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.down_box(FL_BORDER_BOX);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Button(15, 375, 105, 25, _tr("Action"));
+      btnDbAction = o;
+      o.labelsize(16);
+    }
+  }
+}
+
+class EditEntityWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  db_entities_id = null;
+  db_entities_name_ro = null;
+  db_entities_mdate = null;
+  db_entities_cdate = null;
+  tabs = null;
+  tabMain = null;
+  db_entities_name = null;
+  db_entities_company = null;
+  db_entities_address = null;
+  db_entities_zip = null;
+  db_entities_city = null;
+  db_entities_state = null;
+  db_entities_country = null;
+  db_entities_tax_number = null;
+  db_entities_show_on_sales = null;
+  db_entities_show_on_buys = null;
+  db_entities_is_active = null;
+  db_entities_phone = null;
+  db_entities_fax = null;
+  db_entities_use_sales_tax2 = null;
+  db_entities_email = null;
+  db_entities_sales_tax_exempt = null;
+  db_entities_web = null;
+  db_entities_irpf_pct_retention = null;
+  db_entities_contact = null;
+  db_entities_gps_coordinates = null;
+  btnDbAction = null;
+  dbAction = null;
+  tabNotes = null;
+  db_entities_notes = null;
+  tabTags = null;
+  db_entities_tags = null;
+  tabGroups = null;
+  db_entities_group_id = null;
+  tabTotals = null;
+  db_entities_credit_allowed = null;
+  db_entities_balance = null;
+  db_entities_sales_quoted = null;
+  db_entities_sales_ordered = null;
+  db_entities_sales_delivered = null;
+  db_entities_sales_invoiced = null;
+  db_entities_sales_discount = null;
+  db_entities_sales_paid = null;
+  db_entities_buys_quoted = null;
+  db_entities_buys_ordered = null;
+  db_entities_buys_received = null;
+  db_entities_buys_invoiced = null;
+  db_entities_buys_paid = null;
+  db_entities_buys_discount = null;
+  tabChartStatistics = null;
+  tabHistory = null;
+  tabReports = null;
+  btnEntitesListContactReport = null;
+  print_progress = null;
+  
+  constructor(px=54, py=85, pw=800, ph=560, pl=_tr("Edit Entity")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Output(5, 5, 96, 25);
+      db_entities_id = o;
+      o.textsize(16);
+      o.labelsize(16);
+      o.labeltype(FL_NO_LABEL);
+      add_input_field_to_map("entities", "id", db_entities_id);
+    }
+    {
+      local o = Fl_Output(110, 5, 545, 25);
+      db_entities_name_ro = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Output(666, 5, 130, 25);
+      db_entities_mdate = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.tooltip(_tr("This record last update date"));
+      o.labelsize(16);
+      add_input_field_to_map("entities", "mdate", db_entities_mdate);
+    }
+    {
+      local o = Fl_Output(665, 35, 130, 25);
+      db_entities_cdate = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.tooltip(_tr("This record creation date"));
+      o.labelsize(16);
+      add_input_field_to_map("entities", "cdate", db_entities_cdate);
+    }
+    {
+      local o = Fl_Tabs(5, 35, 790, 521);
+      tabs = o;
+      o.labelcolor(7);
+      o.selection_color(4);
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Group(5, 62, 790, 494, _tr("Main"));
+          tabMain = o;
+          o.labelsize(16);
+          o.color(246);
+          {
+            {
+              local o = Fl_Input(115, 70, 670, 25, _tr("Name"));
+              db_entities_name = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "name", db_entities_name);
+            }
+            {
+              local o = Fl_Input(115, 100, 670, 25, _tr("Company"));
+              db_entities_company = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "company", db_entities_company);
+            }
+            {
+              local o = Fl_Input(115, 130, 670, 25, _tr("Address"));
+              db_entities_address = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "address", db_entities_address);
+            }
+            {
+              local o = Fl_Input(115, 160, 95, 25, _tr("ZIP"));
+              db_entities_zip = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "zip", db_entities_zip);
+            }
+            {
+              local o = Fl_Input(311, 160, 474, 25, _tr("City"));
+              db_entities_city = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "city", db_entities_city);
+            }
+            {
+              local o = Fl_Input(115, 189, 390, 25, _tr("State"));
+              db_entities_state = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "state", db_entities_state);
+            }
+            {
+              local o = Fl_Input(585, 190, 200, 25, _tr("Country"));
+              db_entities_country = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "country", db_entities_country);
+            }
+            {
+              local o = Fl_Input(115, 220, 200, 25, _tr("Tax Num."));
+              db_entities_tax_number = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "tax_number", db_entities_tax_number);
+            }
+            {
+              local o = Fl_Check_Button(325, 220, 115, 25, _tr("Sales"));
+              db_entities_show_on_sales = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("entities", "show_on_sales", db_entities_show_on_sales);
+            }
+            {
+              local o = Fl_Check_Button(445, 220, 125, 25, _tr("Buys"));
+              db_entities_show_on_buys = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("entities", "show_on_buys", db_entities_show_on_buys);
+            }
+            {
+              local o = Fl_Check_Button(585, 220, 155, 25, _tr("Active"));
+              db_entities_is_active = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("entities", "is_active", db_entities_is_active);
+            }
+            {
+              local o = Fl_Input(115, 249, 200, 25, _tr("Phone"));
+              db_entities_phone = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "phone", db_entities_phone);
+            }
+            {
+              local o = Fl_Input(370, 249, 200, 25, _tr("Fax"));
+              db_entities_fax = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "fax", db_entities_fax);
+            }
+            {
+              local o = Fl_Check_Button(585, 250, 155, 25, _tr("Use Sales Tax II"));
+              db_entities_use_sales_tax2 = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("entities", "use_sales_tax2", db_entities_use_sales_tax2);
+            }
+            {
+              local o = Fl_Input(115, 280, 455, 25, _tr("Email"));
+              db_entities_email = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "email", db_entities_email);
+            }
+            {
+              local o = Fl_Check_Button(585, 280, 155, 25, _tr("Sales Tax Exempt"));
+              db_entities_sales_tax_exempt = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("entities", "sales_tax_exempt", db_entities_sales_tax_exempt);
+            }
+            {
+              local o = Fl_Input(115, 310, 455, 25, _tr("Web"));
+              db_entities_web = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "web", db_entities_web);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(585, 310, 60, 25, _tr("I.R.P.F. %"));
+              db_entities_irpf_pct_retention = o;
+              o.textsize(16);
+              o.align(8);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "irpf_pct_retention", db_entities_irpf_pct_retention);
+            }
+            {
+              local o = Fl_Input(115, 340, 455, 25, _tr("Contact"));
+              db_entities_contact = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "contact", db_entities_contact);
+            }
+            {
+              local o = Fl_Input(630, 340, 155, 25, _tr("GPS"));
+              db_entities_gps_coordinates = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "gps_coordinates", db_entities_gps_coordinates);
+            }
+            {
+              local o = Fl_Group(675, 394, 110, 151);
+              {
+                {
+                  local o = Fl_Box(675, 394, 110, 73, _tr("Spacer"));
+                  o.labeltype(FL_NO_LABEL);
+                  Fl_Group.current().resizable(o);
+                }
+                {
+                  local o = Fl_Button(675, 470, 110, 25, _tr("Action"));
+                  btnDbAction = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Choice_dbAction(675, 520, 110, 25, _tr("Action"));
+                  dbAction = o;
+                  o.textsize(16);
+                  o.align(1);
+                  o.down_box(FL_BORDER_BOX);
+                  o.labelsize(16);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Tabs(15, 375, 650, 181);
+              o.labelcolor(7);
+              o.selection_color(4);
+              o.labelsize(16);
+              {
+                {
+                  local o = Fl_Group(15, 405, 650, 150, _tr("Notes"));
+                  tabNotes = o;
+                  o.labelsize(16);
+                  {
+                    {
+                      local o = Fl_Text_Editor_Buffered(15, 405, 650, 150);
+                      db_entities_notes = o;
+                      o.textsize(16);
+                      o.align(5);
+                      o.labeltype(FL_NO_LABEL);
+                      o.labelsize(16);
+                      add_input_field_to_map("entities", "notes", db_entities_notes);
+                      Fl_Group.current().resizable(o);
+                    }
+                  }
+                  o.end();
+                }
+                {
+                  local o = Fl_Group(15, 405, 650, 150, _tr("Tags"));
+                  tabTags = o;
+                  o.labelsize(16);
+                  {
+                    {
+                      local o = Fl_Text_Editor_Buffered(15, 405, 650, 150);
+                      db_entities_tags = o;
+                      o.textsize(16);
+                      o.align(5);
+                      o.labeltype(FL_NO_LABEL);
+                      o.labelsize(16);
+                      add_input_field_to_map("entities", "tags", db_entities_tags);
+                      Fl_Group.current().resizable(o);
+                    }
+                  }
+                  o.end();
+                }
+                {
+                  local o = Fl_Group(15, 400, 650, 156, _tr("Groups"));
+                  tabGroups = o;
+                  {
+                    {
+                      local o = Flu_Tree_Browser(15, 405, 650, 150);
+                      db_entities_group_id = o;
+                      o.labelsize(16);
+                      add_input_field_to_map("entities", "group_id", db_entities_group_id);
+                    }
+                  }
+                  o.end();
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Check_Button(375, 380, 102, 25, _tr("Wrap lines"));
+              o.labelsize(16);
+              o.value(1);
+              o.down_box(FL_DOWN_BOX);
+            }
+          }
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Group(5, 62, 790, 493, _tr("Totals"));
+          tabTotals = o;
+          o.labelsize(16);
+          o.color(246);
+          {
+            {
+              local o = Fl_Float_Input_Fmt(140, 75, 110, 25, _tr("Credit"));
+              db_entities_credit_allowed = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "credit_allowed", db_entities_credit_allowed);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(140, 110, 110, 25, _tr("Balance"));
+              db_entities_balance = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "balance", db_entities_balance);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(140, 155, 110, 25, _tr("Sales Quoted"));
+              db_entities_sales_quoted = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "sales_quoted", db_entities_sales_quoted);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(140, 190, 110, 25, _tr("Sales Ordered"));
+              db_entities_sales_ordered = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "sales_ordered", db_entities_sales_ordered);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(140, 225, 110, 25, _tr("Sales Delivered"));
+              db_entities_sales_delivered = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "sales_delivered", db_entities_sales_delivered);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(140, 260, 110, 25, _tr("Sales Invoiced"));
+              db_entities_sales_invoiced = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "sales_invoiced", db_entities_sales_invoiced);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(140, 295, 110, 25, _tr("Sales Discount"));
+              db_entities_sales_discount = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "sales_discount", db_entities_sales_discount);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(140, 330, 110, 25, _tr("Sales Paid"));
+              db_entities_sales_paid = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "sales_paid", db_entities_sales_paid);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(410, 155, 110, 25, _tr("Buys Quoted"));
+              db_entities_buys_quoted = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "buys_quoted", db_entities_buys_quoted);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(410, 190, 110, 25, _tr("Buys Ordered"));
+              db_entities_buys_ordered = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "buys_ordered", db_entities_buys_ordered);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(410, 225, 110, 25, _tr("Buys Received"));
+              db_entities_buys_received = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "buys_received", db_entities_buys_received);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(410, 260, 110, 25, _tr("Buys Invoiced"));
+              db_entities_buys_invoiced = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "buys_invoiced", db_entities_buys_invoiced);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(410, 330, 110, 25, _tr("Buys Paid"));
+              db_entities_buys_paid = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "buys_paid", db_entities_buys_paid);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(410, 295, 110, 25, _tr("Buys Discount"));
+              db_entities_buys_discount = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("entities", "buys_discount", db_entities_buys_discount);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 62, 790, 493, _tr("Statistics"));
+          tabChartStatistics = o;
+          o.labelsize(16);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 59, 790, 496, _tr("History"));
+          tabHistory = o;
+          o.labelsize(16);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 59, 790, 496, _tr("Reports"));
+          tabReports = o;
+          o.labelsize(16);
+          o.color(246);
+          {
+            {
+              local o = Fl_Button(255, 100, 215, 25, _tr("Entities List Contact Report"));
+              btnEntitesListContactReport = o;
+            }
+            {
+              local o = Fl_Progress(255, 140, 215, 25, _tr("Printing Progress"));
+              print_progress = o;
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class EditProductWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  db_products_id = null;
+  db_products_description_ro = null;
+  db_products_mdate = null;
+  db_products_cdate = null;
+  tabs = null;
+  tabMain = null;
+  db_products_reference_code = null;
+  db_products_supplier_code = null;
+  db_products_bar_code = null;
+  db_products_sell_description = null;
+  db_products_buy_description = null;
+  db_products_sell_price = null;
+  db_products_measure_unit_id = null;
+  db_products_sales_tax_id = null;
+  db_products_warranty_id = null;
+  db_products_sell_quantity_min = null;
+  db_products_units_by_package = null;
+  db_products_weight = null;
+  db_products_sell_without_stock = null;
+  db_products_is_active = null;
+  db_products_show_on_sales = null;
+  db_products_show_on_buys = null;
+  db_products_show_on_web = null;
+  db_products_show_price_on_web = null;
+  dbAction = null;
+  btnDbAction = null;
+  tabsMoreData = null;
+  tabNotes = null;
+  db_products_sell_notes = null;
+  tabNotesSupplier = null;
+  db_products_buy_notes = null;
+  tabTags = null;
+  db_products_tags = null;
+  tabGroups = null;
+  db_products_group_id = null;
+  btnImage = null;
+  db_products_quantity_onhand = null;
+  tabPrices = null;
+  db_products_buy_price = null;
+  db_products_buy_discount = null;
+  db_products_buy_other_costs = null;
+  db_products_sell_markup = null;
+  markup_to_discount = null;
+  db_products_sell_price_ro = null;
+  db_products_price_decimals = null;
+  btnSaveProrduct = null;
+  db_products_stock_min = null;
+  db_products_stock_max = null;
+  db_products_buy_quantity_min = null;
+  db_products_price_formula = null;
+  db_products_price_date = null;
+  productPrices = null;
+  tabKit = null;
+  tabChartStatistics = null;
+  tabHistory = null;
+  tabReports = null;
+  grpExportImport = null;
+  btnProductsExport = null;
+  btnProductsImport = null;
+  chkWithoutPrices = null;
+  chkWebOnly = null;
+  boxExportImportCount = null;
+  btnProductGroupsExport = null;
+  btnProductGroupsImport = null;
+  btnUpdateWeb = null;
+  grpPrintPriceList = null;
+  chkPriceListWithVAT = null;
+  chkPriceListSellOnWeb = null;
+  btnPrintPriceList = null;
+  chkPriceListSellSales = null;
+  chkPriceListSellPDF = null;
+  tabTotals = null;
+  db_products_quantity_quoted_sales = null;
+  db_products_quantity_ordered_sales = null;
+  db_products_quantity_delivered = null;
+  db_products_quantity_invoiced_sales = null;
+  db_products_quantity_lost = null;
+  db_products_quantity_quoted_buys = null;
+  db_products_quantity_ordered_buys = null;
+  db_products_quantity_received = null;
+  db_products_quantity_invoiced_buys = null;
+  
+  constructor(px=34, py=28, pw=800, ph=560, pl=_tr("Edit Products")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Output(5, 5, 96, 25);
+      db_products_id = o;
+      o.textsize(16);
+      o.labelsize(16);
+      o.labeltype(FL_NO_LABEL);
+      add_input_field_to_map("products", "id", db_products_id);
+    }
+    {
+      local o = Fl_Output(110, 5, 545, 25);
+      db_products_description_ro = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+    }
+    {
+      local o = Fl_Output(666, 5, 130, 25);
+      db_products_mdate = o;
+      o.textsize(16);
+      o.labelsize(16);
+      o.labeltype(FL_NO_LABEL);
+      add_input_field_to_map("products", "mdate", db_products_mdate);
+    }
+    {
+      local o = Fl_Output(665, 35, 130, 25);
+      db_products_cdate = o;
+      o.textsize(16);
+      o.labeltype(FL_NO_LABEL);
+      o.labelsize(16);
+      add_input_field_to_map("products", "cdate", db_products_cdate);
+    }
+    {
+      local o = Fl_Tabs(5, 35, 790, 520);
+      tabs = o;
+      o.labelcolor(7);
+      o.selection_color(4);
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Group(5, 60, 790, 495, _tr("Main"));
+          tabMain = o;
+          o.color(246);
+          o.labelsize(16);
+          {
+            {
+              local o = Fl_Input(115, 70, 165, 25, _tr("Reference"));
+              db_products_reference_code = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("products", "reference_code", db_products_reference_code);
+            }
+            {
+              local o = Fl_Input(380, 70, 165, 25, _tr("Ref. Supp."));
+              db_products_supplier_code = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("products", "supplier_code", db_products_supplier_code);
+            }
+            {
+              local o = Fl_Input(620, 70, 165, 25, _tr("Barcode"));
+              db_products_bar_code = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("products", "bar_code", db_products_bar_code);
+            }
+            {
+              local o = Fl_Input(115, 100, 670, 25, _tr("Description"));
+              db_products_sell_description = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("products", "sell_description", db_products_sell_description);
+            }
+            {
+              local o = Fl_Input(115, 130, 670, 25, _tr("Desc. Supp."));
+              db_products_buy_description = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("products", "buy_description", db_products_buy_description);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(115, 160, 110, 25, _tr("Sales Price"));
+              db_products_sell_price = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("products", "sell_price", db_products_sell_price);
+            }
+            {
+              local o = Fl_Choice_Int(370, 160, 110, 25, _tr("Measure Unit"));
+              db_products_measure_unit_id = o;
+              o.textsize(16);
+              o.down_box(FL_BORDER_BOX);
+              o.labelsize(16);
+              add_input_field_to_map("products", "measure_unit_id", db_products_measure_unit_id);
+            }
+            {
+              local o = Fl_Choice_Int(115, 190, 110, 25, _tr("V.A.T."));
+              db_products_sales_tax_id = o;
+              o.textsize(16);
+              o.down_box(FL_BORDER_BOX);
+              o.labelsize(16);
+              add_input_field_to_map("products", "sales_tax_id", db_products_sales_tax_id);
+            }
+            {
+              local o = Fl_Choice_Int(370, 190, 110, 25, _tr("Warranty"));
+              db_products_warranty_id = o;
+              o.textsize(16);
+              o.down_box(FL_BORDER_BOX);
+              o.labelsize(16);
+              add_input_field_to_map("products", "warranty_id", db_products_warranty_id);
+            }
+            {
+              local o = Fl_Float_Input(370, 250, 110, 25, _tr("Sell Min. Qty."));
+              db_products_sell_quantity_min = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "sell_quantity_min", db_products_sell_quantity_min);
+            }
+            {
+              local o = Fl_Float_Input(370, 280, 110, 25, _tr("Units by Pack."));
+              db_products_units_by_package = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "units_by_package", db_products_units_by_package);
+            }
+            {
+              local o = Fl_Float_Input(370, 220, 110, 25, _tr("Weight"));
+              db_products_weight = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "weight", db_products_weight);
+            }
+            {
+              local o = Fl_Check_Button(10, 250, 215, 25, _tr("Sell without stock"));
+              db_products_sell_without_stock = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("products", "sell_without_stock", db_products_sell_without_stock);
+            }
+            {
+              local o = Fl_Check_Button(10, 280, 110, 25, _tr("Active"));
+              db_products_is_active = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("products", "is_active", db_products_is_active);
+            }
+            {
+              local o = Fl_Check_Button(10, 310, 105, 25, _tr("Sales"));
+              db_products_show_on_sales = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("products", "show_on_sales", db_products_show_on_sales);
+            }
+            {
+              local o = Fl_Check_Button(10, 340, 95, 25, _tr("Buys"));
+              db_products_show_on_buys = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("products", "show_on_buys", db_products_show_on_buys);
+            }
+            {
+              local o = Fl_Check_Button(115, 310, 120, 25, _tr("Web"));
+              db_products_show_on_web = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("products", "show_on_web", db_products_show_on_web);
+            }
+            {
+              local o = Fl_Check_Button(115, 340, 100, 25, _tr("Web price"));
+              db_products_show_price_on_web = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("products", "show_price_on_web", db_products_show_price_on_web);
+            }
+            {
+              local o = Fl_Group(675, 402, 110, 143);
+              {
+                {
+                  local o = Fl_Box(675, 402, 110, 68, _tr("Spacer"));
+                  o.labeltype(FL_NO_LABEL);
+                  Fl_Group.current().resizable(o);
+                }
+                {
+                  local o = Fl_Choice_dbAction(675, 520, 110, 25, _tr("Action"));
+                  dbAction = o;
+                  o.textsize(16);
+                  o.align(1);
+                  o.down_box(FL_BORDER_BOX);
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Button(675, 470, 110, 25, _tr("Action"));
+                  btnDbAction = o;
+                  o.labelsize(16);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Tabs(10, 370, 650, 181);
+              tabsMoreData = o;
+              o.labelcolor(7);
+              o.selection_color(4);
+              o.labelsize(16);
+              {
+                {
+                  local o = Fl_Group(10, 400, 650, 150, _tr("Notes"));
+                  tabNotes = o;
+                  o.labelsize(16);
+                  {
+                    {
+                      local o = Fl_Text_Editor_Buffered(10, 400, 650, 150);
+                      db_products_sell_notes = o;
+                      o.textsize(16);
+                      o.align(5);
+                      o.labeltype(FL_NO_LABEL);
+                      o.labelsize(16);
+                      add_input_field_to_map("products", "sell_notes", db_products_sell_notes);
+                      Fl_Group.current().resizable(o);
+                    }
+                  }
+                  o.end();
+                }
+                {
+                  local o = Fl_Group(10, 400, 650, 150, _tr("Notes Supplier"));
+                  tabNotesSupplier = o;
+                  o.labelsize(16);
+                  {
+                    {
+                      local o = Fl_Text_Editor_Buffered(10, 400, 650, 150);
+                      db_products_buy_notes = o;
+                      o.textsize(16);
+                      o.align(5);
+                      o.labeltype(FL_NO_LABEL);
+                      o.labelsize(16);
+                      add_input_field_to_map("products", "buy_notes", db_products_buy_notes);
+                      Fl_Group.current().resizable(o);
+                    }
+                  }
+                  o.end();
+                }
+                {
+                  local o = Fl_Group(10, 400, 650, 150, _tr("Tags"));
+                  tabTags = o;
+                  o.labelsize(16);
+                  {
+                    {
+                      local o = Fl_Text_Editor_Buffered(10, 400, 650, 150);
+                      db_products_tags = o;
+                      o.textsize(16);
+                      o.align(5);
+                      o.labeltype(FL_NO_LABEL);
+                      o.labelsize(16);
+                      add_input_field_to_map("products", "tags", db_products_tags);
+                      Fl_Group.current().resizable(o);
+                    }
+                  }
+                  o.end();
+                }
+                {
+                  local o = Fl_Group(10, 395, 650, 156, _tr("Groups"));
+                  tabGroups = o;
+                  {
+                    {
+                      local o = Flu_Tree_Browser(10, 400, 650, 150);
+                      db_products_group_id = o;
+                      o.labelsize(16);
+                      add_input_field_to_map("products", "group_id", db_products_group_id);
+                    }
+                  }
+                  o.end();
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Image_Box(485, 158, 300, 232);
+              btnImage = o;
+              o.box(FL_ENGRAVED_BOX);
+              o.align(80);
+              o.color(7);
+            }
+            {
+              local o = Fl_Check_Button(370, 375, 102, 25, _tr("Wrap lines"));
+              o.labelsize(16);
+              o.value(1);
+              o.down_box(FL_DOWN_BOX);
+              o.callback(function(sender, udata){
+                db_products_sell_notes->wrap_mode(o->value(), 0);
+                db_products_buy_notes->wrap_mode(o->value(), 0);
+                db_products_tags->wrap_mode(o->value(), 0);
+              });
+            }
+            {
+              local o = Fl_Float_Input(115, 220, 110, 25, _tr("Onhand"));
+              db_products_quantity_onhand = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_onhand", db_products_quantity_onhand);
+            }
+          }
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Group(5, 60, 790, 495, _tr("Prices"));
+          tabPrices = o;
+          o.color(246);
+          o.labelsize(16);
+          {
+            {
+              local o = Fl_Group(15, 88, 770, 201, _tr("Sales Price"));
+              o.labelsize(16);
+              o.color(166);
+              o.box(FL_UP_BOX);
+              {
+                {
+                  local o = Fl_Float_Input_Fmt(25, 115, 115, 25, _tr("Buy $"));
+                  db_products_buy_price = o;
+                  o.textsize(16);
+                  o.align(5);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "buy_price", db_products_buy_price);
+                }
+                {
+                  local o = Fl_Float_Input_Fmt(151, 115, 115, 25, _tr("Buy Disc. %"));
+                  db_products_buy_discount = o;
+                  o.textsize(16);
+                  o.align(5);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "buy_discount", db_products_buy_discount);
+                  o->decimal_places(-6);
+                }
+                {
+                  local o = Fl_Float_Input_Fmt(278, 115, 115, 25, _tr("Other Costs $"));
+                  db_products_buy_other_costs = o;
+                  o.textsize(16);
+                  o.align(5);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "buy_other_costs", db_products_buy_other_costs);
+                }
+                {
+                  local o = Fl_Float_Input_Fmt(404, 115, 115, 25, _tr("Markup %"));
+                  db_products_sell_markup = o;
+                  o.textsize(16);
+                  o.align(5);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "sell_markup", db_products_sell_markup);
+                  //o->decimal_places(-6);
+                }
+                {
+                  local o = Fl_Float_Input_Fmt(531, 115, 115, 25, _tr("Margin %"));
+                  markup_to_discount = o;
+                  o.textsize(16);
+                  o.align(5);
+                  o.labelsize(16);
+                  //o->decimal_places(-6);
+                }
+                {
+                  local o = Fl_Float_Input_Fmt(658, 115, 115, 25, _tr("Sales $"));
+                  db_products_sell_price_ro = o;
+                  o.textsize(16);
+                  o.align(5);
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Int_Input(530, 150, 30, 25, _tr("Decimals for calculation"));
+                  db_products_price_decimals = o;
+                  o.textsize(16);
+                  o.labelfont(1);
+                  o.textfont(1);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "price_decimals", db_products_price_decimals);
+                  //o->decimal_places(-6);
+                }
+                {
+                  local o = Fl_Button(662, 150, 111, 25, _tr("Save"));
+                  btnSaveProrduct = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Float_Input(665, 195, 110, 25, _tr("Stock Min."));
+                  db_products_stock_min = o;
+                  o.textsize(16);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "stock_min", db_products_stock_min);
+                  o->decimal_places(-6);
+                }
+                {
+                  local o = Fl_Float_Input(665, 225, 110, 25, _tr("Stock Max."));
+                  db_products_stock_max = o;
+                  o.textsize(16);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "stock_max", db_products_stock_max);
+                  o->decimal_places(-6);
+                }
+                {
+                  local o = Fl_Float_Input(665, 255, 110, 25, _tr("Buy Min. Qty."));
+                  db_products_buy_quantity_min = o;
+                  o.textsize(16);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "buy_quantity_min", db_products_buy_quantity_min);
+                  o->decimal_places(-6);
+                }
+                {
+                  local o = Fl_Multiline_Input(25, 197, 495, 83, _tr("Price formula"));
+                  db_products_price_formula = o;
+                  o.textsize(16);
+                  o.align(5);
+                  o.labelsize(16);
+                  add_input_field_to_map("products", "price_formula", db_products_price_formula);
+                }
+                {
+                  local o = Fl_Output(25, 150, 130, 25, _tr("Last Update"));
+                  db_products_price_date = o;
+                  o.textsize(16);
+                  o.align(8);
+                  o.labelsize(16);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Box(15, 290, 770, 40, _tr("Spacer"));
+              o.labeltype(FL_NO_LABEL);
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Group(15, 332, 770, 212);
+              productPrices = o;
+              o.box(FL_UP_BOX);
+              o.labelsize(16);
+              o.color(166);
+              o.labeltype(FL_NO_LABEL);
+              o.end();
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 59, 790, 495, _tr("Kit"));
+          tabKit = o;
+          o.labelsize(16);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 60, 790, 495, _tr("Statistics"));
+          tabChartStatistics = o;
+          o.labelsize(16);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 60, 790, 495, _tr("History"));
+          tabHistory = o;
+          o.labelsize(16);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 60, 790, 495, _tr("Reports"));
+          tabReports = o;
+          o.labelsize(16);
+          o.color(246);
+          o.box(FL_UP_BOX);
+          {
+            {
+              local o = Fl_Group(15, 465, 770, 80, _tr("Export / Import"));
+              grpExportImport = o;
+              o.labelsize(16);
+              o.box(FL_ENGRAVED_FRAME);
+              {
+                {
+                  local o = Fl_Button(25, 475, 175, 25, _tr("Products Export"));
+                  btnProductsExport = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Button(25, 510, 175, 25, _tr("Products Import"));
+                  btnProductsImport = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Check_Button(225, 480, 150, 25, _tr("Withouth Prices"));
+                  chkWithoutPrices = o;
+                  o.labelsize(16);
+                  o.down_box(FL_DOWN_BOX);
+                }
+                {
+                  local o = Fl_Check_Button(225, 510, 150, 25, _tr("WEB Only"));
+                  chkWebOnly = o;
+                  o.labelsize(16);
+                  o.down_box(FL_DOWN_BOX);
+                }
+                {
+                  local o = Fl_Box(405, 499, 42, 25, _tr("0"));
+                  boxExportImportCount = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Button(555, 475, 220, 25, _tr("Product Groups Export"));
+                  btnProductGroupsExport = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Button(555, 510, 220, 25, _tr("Product Groups import"));
+                  btnProductGroupsImport = o;
+                  o.labelsize(16);
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Button(610, 70, 175, 25, _tr("Update WEB"));
+              btnUpdateWeb = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Group(10, 85, 195, 165, _tr("Price List"));
+              grpPrintPriceList = o;
+              o.labelsize(16);
+              o.box(FL_ENGRAVED_FRAME);
+              {
+                {
+                  local o = Fl_Check_Button(20, 95, 175, 25, _tr("With V.A.T."));
+                  chkPriceListWithVAT = o;
+                  o.labelsize(16);
+                  o.down_box(FL_DOWN_BOX);
+                }
+                {
+                  local o = Fl_Check_Button(20, 125, 170, 25, _tr("Sell on WEB"));
+                  chkPriceListSellOnWeb = o;
+                  o.labelsize(16);
+                  o.down_box(FL_DOWN_BOX);
+                }
+                {
+                  local o = Fl_Button(20, 215, 175, 25, _tr("Print"));
+                  btnPrintPriceList = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Check_Button(20, 155, 175, 25, _tr("Sales"));
+                  chkPriceListSellSales = o;
+                  o.labelsize(16);
+                  o.down_box(FL_DOWN_BOX);
+                }
+                {
+                  local o = Fl_Check_Button(20, 185, 175, 25, _tr("PDF"));
+                  chkPriceListSellPDF = o;
+                  o.labelsize(16);
+                  o.down_box(FL_DOWN_BOX);
+                }
+              }
+              o.end();
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 60, 790, 495, _tr("Totals"));
+          tabTotals = o;
+          o.labelsize(16);
+          o.color(246);
+          {
+            {
+              local o = Fl_Float_Input(220, 80, 110, 25, _tr("Quantity quoted sales"));
+              db_products_quantity_quoted_sales = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_quoted_sales", db_products_quantity_quoted_sales);
+            }
+            {
+              local o = Fl_Float_Input(220, 115, 110, 25, _tr("Quantity ordered sales"));
+              db_products_quantity_ordered_sales = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_ordered_sales", db_products_quantity_ordered_sales);
+            }
+            {
+              local o = Fl_Float_Input(220, 150, 110, 25, _tr("Quantity delivered"));
+              db_products_quantity_delivered = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_delivered", db_products_quantity_delivered);
+            }
+            {
+              local o = Fl_Float_Input(220, 185, 110, 25, _tr("Quantity invoiced sales"));
+              db_products_quantity_invoiced_sales = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_invoiced_sales", db_products_quantity_invoiced_sales);
+            }
+            {
+              local o = Fl_Float_Input(220, 220, 110, 25, _tr("Quantity lost"));
+              db_products_quantity_lost = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_lost", db_products_quantity_lost);
+            }
+            {
+              local o = Fl_Float_Input(665, 85, 110, 25, _tr("Quantity quoted buys"));
+              db_products_quantity_quoted_buys = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_quoted_buys", db_products_quantity_quoted_buys);
+            }
+            {
+              local o = Fl_Float_Input(665, 120, 110, 25, _tr("Quantity ordered buys"));
+              db_products_quantity_ordered_buys = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_ordered_buys", db_products_quantity_ordered_buys);
+            }
+            {
+              local o = Fl_Float_Input(665, 155, 110, 25, _tr("Quantity received"));
+              db_products_quantity_received = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_received", db_products_quantity_received);
+            }
+            {
+              local o = Fl_Float_Input(665, 190, 110, 25, _tr("Quantity invoiced buys"));
+              db_products_quantity_invoiced_buys = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o->decimal_places(-6);
+              add_input_field_to_map("products", "quantity_invoiced_buys", db_products_quantity_invoiced_buys);
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class EditOrderWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  db_orders_mdate = null;
+  db_orders_order_type_id = null;
+  pack_line2 = null;
+  db_orders_series = null;
+  db_orders_order_number = null;
+  db_orders_entity_id = null;
+  db_orders_entity_name = null;
+  btnSearchEntity = null;
+  db_orders_entity_order_number = null;
+  tabs = null;
+  tabMain = null;
+  pack_line3 = null;
+  out_lines = null;
+  db_orders_weight_total = null;
+  btnCalcDelivery = null;
+  db_orders_payment_type_id = null;
+  btnSortLines = null;
+  db_orders_order_date = null;
+  btnShowCalendar = null;
+  grid_lines = null;
+  group_totals = null;
+  db_orders_discount_amt = null;
+  db_orders_subtotal_amt = null;
+  db_orders_sales_tax1_amt = null;
+  db_orders_sales_tax2_amt = null;
+  db_orders_irpf_amt = null;
+  db_orders_total_amt = null;
+  db_orders_cash = null;
+  cash_return = null;
+  btnPrint = null;
+  linesTab = null;
+  group_lines = null;
+  db_orders_lines_batch_order_line_quantity = null;
+  db_orders_lines_batch_order_line_id = null;
+  btnSearchBatchOrderLineId = null;
+  db_orders_lines_xref_order_line_quantity = null;
+  db_orders_lines_xref_order_line_id = null;
+  btnSearchXrefOrderLineId = null;
+  db_orders_lines_product_id = null;
+  db_orders_lines_description = null;
+  btnSearchProduct = null;
+  db_orders_lines_quantity = null;
+  db_orders_lines_price = null;
+  db_orders_lines_price_decimals = null;
+  db_orders_lines_weight = null;
+  db_orders_lines_first_total = null;
+  db_orders_lines_discount_pct = null;
+  db_orders_lines_discount_amt = null;
+  db_orders_lines_line_subtotal = null;
+  db_orders_lines_sales_tax2_pct = null;
+  db_orders_lines_sales_tax1_pct = null;
+  db_orders_lines_sales_tax1_amt = null;
+  btnSaveLine = null;
+  db_orders_lines_line_total = null;
+  tabLineNotes = null;
+  db_orders_lines_notes = null;
+  tabDues = null;
+  grid_dues = null;
+  due_id = null;
+  due_date = null;
+  btnShowCalendarDueDate = null;
+  due_pct = null;
+  due_amount = null;
+  btnDueSave = null;
+  tabPayments = null;
+  grid_payments = null;
+  payment_id = null;
+  payment_date = null;
+  btnShowCalendarPaymentDate = null;
+  payemnt_amount = null;
+  btnPaymentSave = null;
+  btnNumberOrder = null;
+  dbAction = null;
+  btnDbAction = null;
+  tabDelivery = null;
+  db_orders_entity_address = null;
+  db_orders_entity_zip = null;
+  db_orders_entity_city = null;
+  db_orders_entity_state = null;
+  db_orders_entity_country = null;
+  db_orders_entity_phone = null;
+  db_orders_entity_tax_number = null;
+  db_orders_order_valid_till_date = null;
+  btnShowCalendarValidTill = null;
+  db_orders_entity_use_sales_tax2 = null;
+  db_orders_entity_sales_tax_exempt = null;
+  db_orders_notes = null;
+  db_orders_irpf_pct_retention = null;
+  tabOptions = null;
+  opt_ask_for_printer = null;
+  opt_print_only_data = null;
+  opt_print_to_pdf = null;
+  opt_print_page_format = null;
+  btnOptPrint = null;
+  opt_email_program = null;
+  opt_email_program_command = null;
+  btnOptSendEmail = null;
+  opt_print_order_company_info = null;
+  opt_print_order_bottom_info = null;
+  tabChartStatistics = null;
+  tabHistory = null;
+  tabPrintPreview = null;
+  tabTotals = null;
+  totals_balance = null;
+  db_totals_overview_sales_quoted = null;
+  db_totals_overview_sales_ordered = null;
+  db_totals_overview_sales_delivered = null;
+  db_totals_overview_sales_invoiced = null;
+  db_totals_overview_sales_discount = null;
+  db_totals_overview_sales_tax1 = null;
+  db_totals_overview_sales_tax2 = null;
+  db_totals_overview_sales_paid = null;
+  btnRefreshTotals = null;
+  db_totals_overview_buys_quoted = null;
+  db_totals_overview_buys_ordered = null;
+  db_totals_overview_buys_received = null;
+  db_totals_overview_buys_invoiced = null;
+  db_totals_overview_buys_discount = null;
+  db_totals_overview_buys_tax1 = null;
+  db_totals_overview_buys_tax2 = null;
+  db_totals_overview_buys_paid = null;
+  
+  constructor(px=255, py=97, pw=800, ph=560, pl=_tr("Edit Order")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Group(5, 1, 792, 62);
+      {
+        {
+          local o = Fl_Output(670, 5, 125, 25);
+          db_orders_mdate = o;
+          o.textsize(16);
+          o.labelsize(16);
+          o.labeltype(FL_NO_LABEL);
+          add_input_field_to_map("orders", "mdate", db_orders_mdate);
+        }
+        {
+          local o = Flu_Combo_List(5, 5, 655, 25);
+          db_orders_order_type_id = o;
+          o.labelfont(1);
+          o.labeltype(FL_NO_LABEL);
+          o.tooltip(_tr("Selection of the order type"));
+          o.box(FL_DOWN_BOX);
+          o.labelsize(16);
+          add_input_field_to_map("orders", "order_type_id", db_orders_order_type_id);
+        }
+        {
+          local o = Fl_Pack(5, 35, 790, 25);
+          pack_line2 = o;
+          o.type(1);
+          o.labelsize(16);
+          o->spacing(5);
+          o->with_label(1);
+          {
+            {
+              local o = Fl_Input(55, 35, 45, 25, _tr("Series"));
+              db_orders_series = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "series", db_orders_series);
+            }
+            {
+              local o = Fl_Int_Input(172, 35, 95, 25, _tr("Number"));
+              db_orders_order_number = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "order_number", db_orders_order_number);
+              o->use_numeric_format(0);
+            }
+            {
+              local o = Fl_Int_Input(319, 35, 95, 25, _tr("Entity"));
+              db_orders_entity_id = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_id", db_orders_entity_id);
+            }
+            {
+              local o = Fl_Input(420, 35, 335, 25);
+              db_orders_entity_name = o;
+              o.textsize(16);
+              o.labeltype(FL_NO_LABEL);
+              o.textfont(1);
+              o.labelsize(16);
+              o.tooltip(_tr("Type partal description to search on availlable entities"));
+              add_input_field_to_map("orders", "entity_name", db_orders_entity_name);
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Button(765, 35, 30, 25, _tr("@<->"));
+              btnSearchEntity = o;
+              o.labelcolor(22);
+              o.labelsize(18);
+              o.tooltip(_tr("Show entities search window"));
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Input(585, 65, 210, 25, _tr("Their Nº"));
+      db_orders_entity_order_number = o;
+      o.textsize(16);
+      o.labelsize(16);
+      add_input_field_to_map("orders", "entity_order_number", db_orders_entity_order_number);
+    }
+    {
+      local o = Fl_Tabs(5, 68, 790, 487);
+      tabs = o;
+      o.labelcolor(7);
+      o.selection_color(4);
+      o.labelsize(16);
+      {
+        {
+          local o = Fl_Group(5, 95, 790, 460, _tr("Main"));
+          tabMain = o;
+          o.labelsize(16);
+          o.labelfont(2);
+          o.color(246);
+          {
+            {
+              local o = Fl_Pack(11, 105, 780, 25);
+              pack_line3 = o;
+              o.type(1);
+              o.labelsize(16);
+              o->spacing(5);
+              o->with_label(1);
+              {
+                {
+                  local o = Fl_Output(57, 105, 69, 25, _tr("Lines"));
+                  out_lines = o;
+                  o.textsize(16);
+                  o.labelsize(16);
+                  o->right_to_left(1);
+                }
+                {
+                  local o = Fl_Output(189, 105, 110, 25, _tr("Weight"));
+                  db_orders_weight_total = o;
+                  o.textsize(16);
+                  o.labelsize(16);
+                  o->right_to_left(1);
+                  o->decimal_places(-2);
+                  o->use_numeric_format(1);
+                }
+                {
+                  local o = Fl_Button(309, 105, 30, 25, _tr("@<->"));
+                  btnCalcDelivery = o;
+                  o.labelcolor(22);
+                  o.labelsize(18);
+                  o.tooltip(_tr("Show delivery calc window"));
+                }
+                {
+                  local o = Fl_Choice_Int(345, 105, 235, 25);
+                  db_orders_payment_type_id = o;
+                  o.textsize(16);
+                  o.labeltype(FL_NO_LABEL);
+                  o.textfont(1);
+                  o.labelsize(16);
+                  o.down_box(FL_BORDER_BOX);
+                  add_input_field_to_map("orders", "payment_type_id", db_orders_payment_type_id);
+                  Fl_Group.current().resizable(o);
+                }
+                {
+                  local o = Fl_Button(590, 105, 30, 25, _tr("@2"));
+                  btnSortLines = o;
+                  o.labelcolor(22);
+                  o.labelsize(18);
+                  o.tooltip(_tr("Sort lines by description"));
+                }
+                {
+                  local o = Fl_Input(629, 105, 120, 25);
+                  db_orders_order_date = o;
+                  o.textsize(16);
+                  o.labeltype(FL_NO_LABEL);
+                  o.textfont(1);
+                  o.labelsize(16);
+                  add_input_field_to_map("orders", "order_date", db_orders_order_date);
+                }
+                {
+                  local o = Fl_Button(760, 105, 30, 25, _tr("@<->"));
+                  btnShowCalendar = o;
+                  o.labelcolor(22);
+                  o.labelsize(18);
+                  o.tooltip(_tr("Show calendar"));
+                }
+              }
+              o.end();
+            }
+            {
+              local o = Fl_Data_Table(10, 135, 780, 150);
+              grid_lines = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o.end();
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Group(10, 290, 781, 260);
+              {
+                {
+                  local o = Fl_Group(600, 291, 190, 259);
+                  group_totals = o;
+                  o.box(FL_UP_BOX);
+                  o.color(174);
+                  {
+                    {
+                      local o = Fl_Output(685, 297, 100, 25, _tr("Discount"));
+                      db_orders_discount_amt = o;
+                      o.textsize(16);
+                      o.labelsize(16);
+                      o->right_to_left(1);
+                      o->use_numeric_format(1);
+                      add_input_field_to_map("orders", "discount_amt", db_orders_discount_amt);
+                    }
+                    {
+                      local o = Fl_Output(684, 326, 100, 25, _tr("Subtotal"));
+                      db_orders_subtotal_amt = o;
+                      o.textsize(16);
+                      o.labelsize(16);
+                      o->right_to_left(1);
+                      o->use_numeric_format(1);
+                      add_input_field_to_map("orders", "subtotal_amt", db_orders_subtotal_amt);
+                    }
+                    {
+                      local o = Fl_Output(685, 356, 100, 25, _tr("V.A.T."));
+                      db_orders_sales_tax1_amt = o;
+                      o.textsize(16);
+                      o.labelsize(16);
+                      o->right_to_left(1);
+                      o->use_numeric_format(1);
+                      add_input_field_to_map("orders", "sales_tax1_amt", db_orders_sales_tax1_amt);
+                    }
+                    {
+                      local o = Fl_Output(684, 386, 100, 25, _tr("R.E."));
+                      db_orders_sales_tax2_amt = o;
+                      o.textsize(16);
+                      o.labelsize(16);
+                      o->right_to_left(1);
+                      o->use_numeric_format(1);
+                      add_input_field_to_map("orders", "sales_tax2_amt", db_orders_sales_tax2_amt);
+                    }
+                    {
+                      local o = Fl_Output(685, 416, 100, 25, _tr("I.R.P.F."));
+                      db_orders_irpf_amt = o;
+                      o.textsize(16);
+                      o.labelsize(16);
+                      o->right_to_left(1);
+                      o->use_numeric_format(1);
+                      add_input_field_to_map("orders", "irpf_amt", db_orders_irpf_amt);
+                    }
+                    {
+                      local o = Fl_Output(610, 453, 174, 33, _tr("Total"));
+                      db_orders_total_amt = o;
+                      o.textsize(30);
+                      o.align(5);
+                      o.textfont(1);
+                      o.color(119);
+                      o.labelfont(1);
+                      o->right_to_left(1);
+                      o->use_numeric_format(1);
+                      add_input_field_to_map("orders", "total_amt", db_orders_total_amt);
+                    }
+                    {
+                      local o = Fl_Float_Input_Fmt(685, 490, 100, 25, _tr("Cash"));
+                      db_orders_cash = o;
+                      o.textsize(16);
+                      o.labelfont(1);
+                      o.textfont(1);
+                      o.labelsize(16);
+                      add_input_field_to_map("orders", "cash", db_orders_cash);
+                    }
+                    {
+                      local o = Fl_Output(685, 520, 100, 25, _tr("Return"));
+                      cash_return = o;
+                      o.textsize(16);
+                      o.labelfont(1);
+                      o.textfont(1);
+                      o.labelsize(16);
+                      o->right_to_left(1);
+                      o->use_numeric_format(1);
+                    }
+                  }
+                  o.end();
+                }
+                {
+                  local o = My_Fl_Return_Button(485, 525, 100, 25, _tr("Print"));
+                  btnPrint = o;
+                  o.labelsize(16);
+                }
+                {
+                  local o = Fl_Tabs(10, 290, 585, 230);
+                  linesTab = o;
+                  o.labelcolor(7);
+                  o.labelsize(16);
+                  o.labelfont(2);
+                  o.selection_color(4);
+                  {
+                    {
+                      local o = Fl_Group(10, 321, 585, 199, _tr("Line Edit"));
+                      group_lines = o;
+                      o.labelsize(16);
+                      o.color(166);
+                      o.labelfont(2);
+                      o.box(FL_UP_BOX);
+                      {
+                        {
+                          local o = Fl_Output(265, 330, 110, 25, _tr("Batch Qty."));
+                          db_orders_lines_batch_order_line_quantity = o;
+                          o.textsize(16);
+                          o.labelsize(16);
+                          o->right_to_left(1);
+                          add_input_field_to_map("orders_lines", "batch_order_line_quantity", db_orders_lines_batch_order_line_quantity);
+                        }
+                        {
+                          local o = Fl_Int_Input(435, 329, 110, 25, _tr("Batch #"));
+                          db_orders_lines_batch_order_line_id = o;
+                          o.textsize(16);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "batch_order_line_id", db_orders_lines_batch_order_line_id);
+                        }
+                        {
+                          local o = Fl_Button(555, 329, 30, 25, _tr("@<->"));
+                          btnSearchBatchOrderLineId = o;
+                          o.labelcolor(22);
+                          o.labelsize(18);
+                          o.tooltip(_tr("Show products search window"));
+                        }
+                        {
+                          local o = Fl_Output(265, 360, 110, 25, _tr("XRef. Qty."));
+                          db_orders_lines_xref_order_line_quantity = o;
+                          o.textsize(16);
+                          o.labelsize(16);
+                          o->right_to_left(1);
+                          add_input_field_to_map("orders_lines", "xref_order_line_quantity", db_orders_lines_xref_order_line_quantity);
+                        }
+                        {
+                          local o = Fl_Int_Input(435, 359, 110, 25, _tr("XRef #"));
+                          db_orders_lines_xref_order_line_id = o;
+                          o.textsize(16);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "xref_order_line_id", db_orders_lines_xref_order_line_id);
+                        }
+                        {
+                          local o = Fl_Button(555, 359, 30, 25, _tr("@<->"));
+                          btnSearchXrefOrderLineId = o;
+                          o.labelcolor(22);
+                          o.labelsize(18);
+                          o.tooltip(_tr("Show products search window"));
+                        }
+                        {
+                          local o = Fl_Int_Input(21, 387, 70, 25, _tr("Code"));
+                          db_orders_lines_product_id = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "product_id", db_orders_lines_product_id);
+                        }
+                        {
+                          local o = Fl_Input(101, 387, 444, 25, _tr("Description"));
+                          db_orders_lines_description = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.textfont(1);
+                          o.labelsize(16);
+                          o.tooltip(_tr("Type partal description to search on availlable products"));
+                          add_input_field_to_map("orders_lines", "description", db_orders_lines_description);
+                        }
+                        {
+                          local o = Fl_Button(555, 387, 30, 25, _tr("@<->"));
+                          btnSearchProduct = o;
+                          o.labelcolor(22);
+                          o.labelsize(18);
+                          o.tooltip(_tr("Show products search window"));
+                        }
+                        {
+                          local o = My_Fl_Float_Input(21, 435, 84, 25, _tr("Quantity"));
+                          db_orders_lines_quantity = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.textfont(1);
+                          o.labelsize(16);
+                          o.labelfont(1);
+                          o->decimal_places(-6);
+                          add_input_field_to_map("orders_lines", "quantity", db_orders_lines_quantity);
+                        }
+                        {
+                          local o = My_Fl_Float_Input(115, 435, 108, 25, _tr("Price"));
+                          db_orders_lines_price = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.textfont(1);
+                          o.labelsize(16);
+                          o.labelfont(1);
+                          add_input_field_to_map("orders_lines", "price", db_orders_lines_price);
+                        }
+                        {
+                          local o = Fl_Int_Input(230, 435, 20, 25, _tr("(.)"));
+                          db_orders_lines_price_decimals = o;
+                          o.textsize(16);
+                          o.align(1);
+                          o.tooltip(_tr("Number of decimals to use on calculations"));
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "price_decimals", db_orders_lines_price_decimals);
+                        }
+                        {
+                          local o = My_Fl_Float_Input(255, 435, 70, 25, _tr("Weight"));
+                          db_orders_lines_weight = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          o->decimal_places(-6);
+                          add_input_field_to_map("orders_lines", "weight", db_orders_lines_weight);
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(330, 435, 100, 25, _tr("1st total"));
+                          db_orders_lines_first_total = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "first_total", db_orders_lines_first_total);
+                        }
+                        {
+                          local o = My_Fl_Float_Input(435, 435, 60, 25, _tr("Disc. %"));
+                          db_orders_lines_discount_pct = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "discount_pct", db_orders_lines_discount_pct);
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(505, 435, 80, 25, _tr("Disc. $"));
+                          db_orders_lines_discount_amt = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "discount_amt", db_orders_lines_discount_amt);
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(21, 485, 108, 25, _tr("Subtotal"));
+                          db_orders_lines_line_subtotal = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "line_subtotal", db_orders_lines_line_subtotal);
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(139, 485, 64, 25, _tr("R.E. %"));
+                          db_orders_lines_sales_tax2_pct = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "sales_tax2_pct", db_orders_lines_sales_tax2_pct);
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(213, 485, 64, 25, _tr("V.A.T. %"));
+                          db_orders_lines_sales_tax1_pct = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "sales_tax1_pct", db_orders_lines_sales_tax1_pct);
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(287, 485, 87, 25, _tr("V.A.T. $"));
+                          db_orders_lines_sales_tax1_amt = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "sales_tax1_amt", db_orders_lines_sales_tax1_amt);
+                        }
+                        {
+                          local o = My_Fl_Return_Button(384, 485, 83, 25, _tr("Save"));
+                          btnSaveLine = o;
+                          o.labelfont(1);
+                          o.labelsize(16);
+                          o.tooltip(_tr("Save the line currently edited"));
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(477, 485, 108, 25, _tr("Total"));
+                          db_orders_lines_line_total = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.textfont(1);
+                          o.labelsize(16);
+                          o.labelfont(1);
+                          add_input_field_to_map("orders_lines", "line_total", db_orders_lines_line_total);
+                        }
+                      }
+                      o.end();
+                    }
+                    {
+                      local o = Fl_Group(10, 320, 585, 200, _tr("Line Notes"));
+                      tabLineNotes = o;
+                      o.labelfont(2);
+                      o.labelsize(16);
+                      {
+                        {
+                          local o = Fl_Multiline_Input(80, 330, 505, 180, _tr("Notes"));
+                          db_orders_lines_notes = o;
+                          o.textsize(16);
+                          o.tooltip(_tr("Type partial description to search on availlable products"));
+                          o.labelsize(16);
+                          add_input_field_to_map("orders_lines", "notes", db_orders_lines_notes);
+                        }
+                      }
+                      o.end();
+                    }
+                    {
+                      local o = Fl_Group(10, 320, 585, 200, _tr("Dues"));
+                      tabDues = o;
+                      o.labelfont(2);
+                      o.labelsize(16);
+                      {
+                        {
+                          local o = Fl_Data_Table(15, 330, 575, 130);
+                          grid_dues = o;
+                          o.textsize(16);
+                          o.labelsize(16);
+                          o.end();
+                        }
+                        {
+                          local o = Fl_Output(15, 485, 80, 25, _tr("ID"));
+                          due_id = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          o->right_to_left(1);
+                        }
+                        {
+                          local o = Fl_Input(100, 485, 125, 25, _tr("Due"));
+                          due_date = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          o.textfont(1);
+                        }
+                        {
+                          local o = Fl_Button(230, 485, 30, 25, _tr("@<->"));
+                          btnShowCalendarDueDate = o;
+                          o.labelcolor(22);
+                          o.labelsize(18);
+                          o.tooltip(_tr("Show calendar"));
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(270, 485, 80, 25, _tr("Pct. %"));
+                          due_pct = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.textfont(1);
+                          o.labelsize(16);
+                          o.labelfont(1);
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(355, 485, 120, 25, _tr("Amount"));
+                          due_amount = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.textfont(1);
+                          o.labelsize(16);
+                          o.labelfont(1);
+                        }
+                        {
+                          local o = My_Fl_Return_Button(485, 485, 100, 25, _tr("Save"));
+                          btnDueSave = o;
+                          o.labelsize(16);
+                        }
+                      }
+                      o.end();
+                    }
+                    {
+                      local o = Fl_Group(10, 320, 585, 200, _tr("Payments"));
+                      tabPayments = o;
+                      o.labelfont(2);
+                      o.labelsize(16);
+                      {
+                        {
+                          local o = Fl_Data_Table(15, 330, 575, 130);
+                          grid_payments = o;
+                          o.textsize(16);
+                          o.labelsize(16);
+                          o.end();
+                        }
+                        {
+                          local o = Fl_Output(15, 485, 80, 25, _tr("ID"));
+                          payment_id = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          o->right_to_left(1);
+                        }
+                        {
+                          local o = Fl_Input(100, 485, 125, 25, _tr("Date"));
+                          payment_date = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.labelsize(16);
+                          o.textfont(1);
+                        }
+                        {
+                          local o = Fl_Button(230, 485, 30, 25, _tr("@<->"));
+                          btnShowCalendarPaymentDate = o;
+                          o.labelcolor(22);
+                          o.labelsize(18);
+                          o.tooltip(_tr("Show calendar"));
+                        }
+                        {
+                          local o = Fl_Float_Input_Fmt(270, 485, 120, 25, _tr("Amount"));
+                          payemnt_amount = o;
+                          o.textsize(16);
+                          o.align(5);
+                          o.textfont(1);
+                          o.labelsize(16);
+                          o.labelfont(1);
+                        }
+                        {
+                          local o = My_Fl_Return_Button(395, 485, 100, 25, _tr("Save"));
+                          btnPaymentSave = o;
+                          o.labelsize(16);
+                        }
+                      }
+                      o.end();
+                    }
+                  }
+                  o.end();
+                }
+              }
+              o.end();
+            }
+            {
+              local o = My_Fl_Return_Button(230, 525, 82, 25, _tr("Number"));
+              btnNumberOrder = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Choice_dbAction(9, 525, 119, 25);
+              dbAction = o;
+              o.textsize(16);
+              o.labeltype(FL_NO_LABEL);
+              o.down_box(FL_BORDER_BOX);
+              o.labelsize(16);
+            }
+            {
+              local o = My_Fl_Return_Button(138, 525, 82, 25, _tr("Action"));
+              btnDbAction = o;
+              o.labelfont(1);
+              o.labelsize(16);
+              o.tooltip(_tr("Perform the selected action on this order"));
+            }
+          }
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Group(5, 95, 790, 460, _tr("Delivery"));
+          tabDelivery = o;
+          o.labelfont(2);
+          o.labelsize(16);
+          o.color(246);
+          {
+            {
+              local o = Fl_Input(91, 105, 694, 25, _tr("Address"));
+              db_orders_entity_address = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_address", db_orders_entity_address);
+            }
+            {
+              local o = Fl_Input(91, 135, 95, 25, _tr("ZIP"));
+              db_orders_entity_zip = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_zip", db_orders_entity_zip);
+            }
+            {
+              local o = Fl_Input(288, 135, 497, 25, _tr("City"));
+              db_orders_entity_city = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_city", db_orders_entity_city);
+            }
+            {
+              local o = Fl_Input(91, 165, 407, 25, _tr("State"));
+              db_orders_entity_state = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_state", db_orders_entity_state);
+            }
+            {
+              local o = Fl_Input(585, 165, 201, 25, _tr("Country"));
+              db_orders_entity_country = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_country", db_orders_entity_country);
+            }
+            {
+              local o = Fl_Input(91, 195, 201, 25, _tr("Phone"));
+              db_orders_entity_phone = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_phone", db_orders_entity_phone);
+            }
+            {
+              local o = Fl_Input(585, 195, 200, 25, _tr("Tax Num."));
+              db_orders_entity_tax_number = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "entity_tax_number", db_orders_entity_tax_number);
+            }
+            {
+              local o = Fl_Input(90, 225, 121, 25, _tr("Valid till"));
+              db_orders_order_valid_till_date = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "order_valid_till_date", db_orders_order_valid_till_date);
+            }
+            {
+              local o = Fl_Button(221, 225, 30, 25, _tr("@<->"));
+              btnShowCalendarValidTill = o;
+              o.labelcolor(22);
+              o.labelsize(18);
+              o.tooltip(_tr("Show calendar"));
+            }
+            {
+              local o = Fl_Check_Button(585, 225, 155, 25, _tr("Use Sales Tax II"));
+              db_orders_entity_use_sales_tax2 = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("orders", "entity_use_sales_tax2", db_orders_entity_use_sales_tax2);
+            }
+            {
+              local o = Fl_Check_Button(585, 255, 155, 25, _tr("Sales Tax Exempt"));
+              db_orders_entity_sales_tax_exempt = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+              add_input_field_to_map("orders", "entity_sales_tax_exempt", db_orders_entity_sales_tax_exempt);
+            }
+            {
+              local o = Fl_Text_Editor_Buffered(15, 395, 770, 150, _tr("Notes"));
+              db_orders_notes = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              #include <FL/Fl_Text_Editor.H>
+              add_input_field_to_map("orders", "notes", db_orders_notes);
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Check_Button(125, 375, 125, 25, _tr("Wrap lines"));
+              o.labelsize(16);
+              o.value(1);
+              o.down_box(FL_DOWN_BOX);
+              o.callback(function(sender, udata){
+                db_orders_notes->wrap_mode(o->value(), 0);
+              });
+            }
+            {
+              local o = Fl_Float_Input_Fmt(585, 285, 70, 25, _tr("I.R.P.F. %"));
+              db_orders_irpf_pct_retention = o;
+              o.textsize(16);
+              o.align(8);
+              o.labelsize(16);
+              add_input_field_to_map("orders", "irpf_pct_retention", db_orders_irpf_pct_retention);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 95, 790, 460, _tr("Options"));
+          tabOptions = o;
+          o.labelfont(2);
+          o.labelsize(16);
+          o.color(246);
+          {
+            {
+              local o = Fl_Check_Button(20, 115, 155, 25, _tr("Ask for printer"));
+              opt_ask_for_printer = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+            }
+            {
+              local o = Fl_Check_Button(20, 150, 155, 25, _tr("Print only data"));
+              opt_print_only_data = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+            }
+            {
+              local o = Fl_Check_Button(20, 180, 155, 25, _tr("Print to PDF"));
+              opt_print_to_pdf = o;
+              o.labelsize(16);
+              o.down_box(FL_DOWN_BOX);
+            }
+            {
+              local o = Fl_Choice_Str(20, 215, 130, 25);
+              opt_print_page_format = o;
+              o.textsize(16);
+              o.labelsize(16);
+              o.labeltype(FL_NO_LABEL);
+              o.down_box(FL_BORDER_BOX);
+            }
+            {
+              local o = Fl_Button(20, 250, 130, 25, _tr("Print"));
+              btnOptPrint = o;
+              o.labelsize(16);
+              o.tooltip(_tr("Print the current order"));
+            }
+            {
+              local o = Fl_Input(260, 145, 520, 25, _tr("Email program"));
+              opt_email_program = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              o.tooltip(_tr("Type partal description to search on availlable entities"));
+            }
+            {
+              local o = Fl_Input(260, 210, 520, 25, _tr("Email program parameters"));
+              opt_email_program_command = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              o.tooltip(_tr("Type partal description to search on availlable entities"));
+            }
+            {
+              local o = Fl_Button(260, 250, 130, 25, _tr("Send as email"));
+              btnOptSendEmail = o;
+              o.labelsize(16);
+              o.tooltip(_tr("Print the current order"));
+            }
+            {
+              local o = Fl_Text_Editor_Buffered(20, 350, 375, 200, _tr("Company Info"));
+              opt_print_order_company_info = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              #include <FL/Fl_Text_Editor.H>
+            }
+            {
+              local o = Fl_Check_Button(200, 330, 125, 25, _tr("Wrap lines"));
+              o.labelsize(16);
+              o.value(1);
+              o.down_box(FL_DOWN_BOX);
+              o.callback(function(sender, udata){
+                opt_print_order_company_info->wrap_mode(o->value(), 0);
+              });
+            }
+            {
+              local o = Fl_Text_Editor_Buffered(405, 350, 375, 200, _tr("Company Info"));
+              opt_print_order_bottom_info = o;
+              o.textsize(16);
+              o.align(5);
+              o.labelsize(16);
+              #include <FL/Fl_Text_Editor.H>
+              Fl_Group.current().resizable(o);
+            }
+            {
+              local o = Fl_Check_Button(590, 330, 125, 25, _tr("Wrap lines"));
+              o.labelsize(16);
+              o.value(1);
+              o.down_box(FL_DOWN_BOX);
+              o.callback(function(sender, udata){
+                opt_print_order_bottom_info->wrap_mode(o->value(), 0);
+              });
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 95, 790, 460, _tr("Statistics"));
+          tabChartStatistics = o;
+          o.labelsize(16);
+          o.labelfont(2);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 95, 790, 460, _tr("History"));
+          tabHistory = o;
+          o.labelsize(16);
+          o.labelfont(2);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 95, 790, 460, _tr("Preview"));
+          tabPrintPreview = o;
+          o.labelsize(16);
+          o.labelfont(2);
+          o.color(246);
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 95, 790, 460, _tr("Totals"));
+          tabTotals = o;
+          o.labelfont(2);
+          o.labelsize(16);
+          o.color(246);
+          {
+            {
+              local o = Fl_Float_Input_Fmt(145, 155, 110, 25, _tr("Balance"));
+              totals_balance = o;
+              o.textsize(16);
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 200, 110, 25, _tr("Sales Quoted"));
+              db_totals_overview_sales_quoted = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_quoted", db_totals_overview_sales_quoted);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 235, 110, 25, _tr("Sales Ordered"));
+              db_totals_overview_sales_ordered = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_ordered", db_totals_overview_sales_ordered);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 270, 110, 25, _tr("Sales Delivered"));
+              db_totals_overview_sales_delivered = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_delivered", db_totals_overview_sales_delivered);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 305, 110, 25, _tr("Sales Invoiced"));
+              db_totals_overview_sales_invoiced = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_invoiced", db_totals_overview_sales_invoiced);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 340, 110, 25, _tr("Sales Discount"));
+              db_totals_overview_sales_discount = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_discount", db_totals_overview_sales_discount);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 375, 110, 25, _tr("Sales Tax1"));
+              db_totals_overview_sales_tax1 = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_tax1", db_totals_overview_sales_tax1);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 410, 110, 25, _tr("Sales Tax2"));
+              db_totals_overview_sales_tax2 = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_tax2", db_totals_overview_sales_tax2);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(145, 445, 110, 25, _tr("Sales Paid"));
+              db_totals_overview_sales_paid = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "sales_paid", db_totals_overview_sales_paid);
+            }
+            {
+              local o = My_Fl_Return_Button(415, 155, 110, 25, _tr("Refresh"));
+              btnRefreshTotals = o;
+              o.labelsize(16);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 200, 110, 25, _tr("Buys Quoted"));
+              db_totals_overview_buys_quoted = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_quoted", db_totals_overview_buys_quoted);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 235, 110, 25, _tr("Buys Ordered"));
+              db_totals_overview_buys_ordered = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_ordered", db_totals_overview_buys_ordered);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 270, 110, 25, _tr("Buys Received"));
+              db_totals_overview_buys_received = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_received", db_totals_overview_buys_received);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 305, 110, 25, _tr("Buys Invoiced"));
+              db_totals_overview_buys_invoiced = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_invoiced", db_totals_overview_buys_invoiced);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 340, 110, 25, _tr("Buys Discount"));
+              db_totals_overview_buys_discount = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_discount", db_totals_overview_buys_discount);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 375, 110, 25, _tr("Buys Tax1"));
+              db_totals_overview_buys_tax1 = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_tax1", db_totals_overview_buys_tax1);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 410, 110, 25, _tr("Buys Tax2"));
+              db_totals_overview_buys_tax2 = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_tax2", db_totals_overview_buys_tax2);
+            }
+            {
+              local o = Fl_Float_Input_Fmt(415, 445, 110, 25, _tr("Buys Paid"));
+              db_totals_overview_buys_paid = o;
+              o.textsize(16);
+              o.labelsize(16);
+              add_input_field_to_map("totals_overview", "buys_paid", db_totals_overview_buys_paid);
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+  }
+}
+
+class PosWindow extends Edit_Base_Window {
+  
+  // Declaration of class members
+  groupOrder = null;
+  btnUser = null;
+  grid_order = null;
+  orderTotal = null;
+  btnOrder1 = null;
+  btnOrder2 = null;
+  btnOrder3 = null;
+  btnOrder4 = null;
+  btnOrder5 = null;
+  btnOrder6 = null;
+  btnOrder7 = null;
+  btnOrder8 = null;
+  groupProducts = null;
+  grid_products = null;
+  btnProducts1 = null;
+  btnProducts2 = null;
+  btnProducts3 = null;
+  btnProducts4 = null;
+  groupActions = null;
+  btnOptions11 = null;
+  calcDisplay = null;
+  btnCalc9 = null;
+  btnCalc8 = null;
+  btnCalc7 = null;
+  btnCalc6 = null;
+  btnCalc5 = null;
+  btnCalc4 = null;
+  btnCalc3 = null;
+  btnCalc2 = null;
+  btnCalc1 = null;
+  btnCalc0 = null;
+  btnCalcOk = null;
+  btnOptions1 = null;
+  btnOptions2 = null;
+  btnOptions3 = null;
+  btnOptions4 = null;
+  btnOptions5 = null;
+  btnOptions6 = null;
+  btnOptions9 = null;
+  btnOptions10 = null;
+  btnOptions7 = null;
+  btnOptions8 = null;
+  groupShortCuts = null;
+  btnShortcut1 = null;
+  btnShortcut2 = null;
+  btnShortcut3 = null;
+  btnShortcut4 = null;
+  btnShortcut5 = null;
+  
+  constructor(px=53, py=84, pw=800, ph=560, pl=_tr("Point of Sales")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Group(5, 5, 190, 550);
+      groupOrder = o;
+      o.box(FL_ENGRAVED_BOX);
+      {
+        {
+          local o = Fl_Button(10, 10, 180, 30, _tr("User"));
+          btnUser = o;
+          o.labelfont(1);
+          o.labelsize(26);
+        }
+        {
+          local o = Fl_Data_Table(10, 48, 180, 310);
+          grid_order = o;
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Output(70, 364, 120, 31, _tr("Total"));
+          orderTotal = o;
+          o.textsize(20);
+          o.labelfont(1);
+          o.labelsize(16);
+          o.textfont(1);
+        }
+        {
+          local o = Fl_Button(10, 415, 85, 30, _tr("1"));
+          btnOrder1 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(105, 415, 85, 30, _tr("2"));
+          btnOrder2 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(10, 450, 85, 30, _tr("3"));
+          btnOrder3 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(105, 450, 85, 30, _tr("4"));
+          btnOrder4 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(10, 485, 85, 30, _tr("5"));
+          btnOrder5 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(105, 485, 85, 30, _tr("6"));
+          btnOrder6 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(10, 520, 85, 30, _tr("7"));
+          btnOrder7 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(105, 520, 85, 30, _tr("8"));
+          btnOrder8 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Group(200, 5, 410, 480);
+      groupProducts = o;
+      o.box(FL_ENGRAVED_BOX);
+      {
+        {
+          local o = Fl_Data_Table(205, 10, 395, 405);
+          grid_products = o;
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Button(210, 425, 75, 55, _tr("@4->"));
+          btnProducts1 = o;
+          o.labelfont(1);
+          o.labelsize(40);
+        }
+        {
+          local o = Fl_Button(295, 425, 75, 55, _tr("@8->"));
+          btnProducts2 = o;
+          o.labelfont(1);
+          o.labelsize(40);
+        }
+        {
+          local o = Fl_Button(440, 425, 75, 55, _tr("@2->"));
+          btnProducts3 = o;
+          o.labelfont(1);
+          o.labelsize(40);
+        }
+        {
+          local o = Fl_Button(525, 425, 75, 55, _tr("@->"));
+          btnProducts4 = o;
+          o.labelfont(1);
+          o.labelsize(40);
+        }
+      }
+      o.end();
+      Fl_Group.current().resizable(o);
+    }
+    {
+      local o = Fl_Group(615, 5, 180, 550);
+      groupActions = o;
+      o.box(FL_ENGRAVED_BOX);
+      {
+        {
+          local o = Fl_Button(620, 510, 170, 40, _tr("11"));
+          btnOptions11 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Output(620, 149, 170, 31);
+          calcDisplay = o;
+          o.textsize(20);
+          o.labelsize(16);
+          o.labelfont(1);
+          o.labeltype(FL_NO_LABEL);
+          o.textfont(1);
+        }
+        {
+          local o = Fl_Button(740, 185, 50, 50, _tr("9"));
+          btnCalc9 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(680, 185, 50, 50, _tr("8"));
+          btnCalc8 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(620, 185, 50, 50, _tr("7"));
+          btnCalc7 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(740, 245, 50, 50, _tr("6"));
+          btnCalc6 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(680, 245, 50, 50, _tr("5"));
+          btnCalc5 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(620, 245, 50, 50, _tr("4"));
+          btnCalc4 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(740, 305, 50, 50, _tr("3"));
+          btnCalc3 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(680, 305, 50, 50, _tr("2"));
+          btnCalc2 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(620, 305, 50, 50, _tr("1"));
+          btnCalc1 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(620, 365, 50, 50, _tr("0"));
+          btnCalc0 = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(680, 365, 110, 50, _tr("OK"));
+          btnCalcOk = o;
+          o.labelfont(1);
+          o.labelsize(42);
+        }
+        {
+          local o = Fl_Button(620, 10, 80, 35, _tr("1"));
+          btnOptions1 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(710, 10, 80, 35, _tr("2"));
+          btnOptions2 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(620, 55, 80, 35, _tr("3"));
+          btnOptions3 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(710, 55, 80, 35, _tr("4"));
+          btnOptions4 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(620, 100, 80, 35, _tr("5"));
+          btnOptions5 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(710, 100, 80, 35, _tr("6"));
+          btnOptions6 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(620, 465, 80, 35, _tr("9"));
+          btnOptions9 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(710, 465, 80, 35, _tr("10"));
+          btnOptions10 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(620, 425, 80, 35, _tr("7"));
+          btnOptions7 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(710, 425, 80, 35, _tr("8"));
+          btnOptions8 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+    {
+      local o = Fl_Group(200, 490, 410, 65);
+      groupShortCuts = o;
+      o.box(FL_ENGRAVED_BOX);
+      {
+        {
+          local o = Fl_Button(205, 495, 75, 55, _tr("User"));
+          btnShortcut1 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(285, 495, 75, 55, _tr("User"));
+          btnShortcut2 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(368, 495, 75, 55, _tr("User"));
+          btnShortcut3 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(450, 495, 75, 55, _tr("User"));
+          btnShortcut4 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+        {
+          local o = Fl_Button(530, 495, 75, 55, _tr("User"));
+          btnShortcut5 = o;
+          o.labelfont(1);
+          o.labelsize(16);
+        }
+      }
+      o.end();
+    }
+  }
+}
+
+class MainWindow extends Base_Window {
+  
+  // Declaration of class members
+  tabs = null;
+  tabSales = null;
+  btnOrdersSales = null;
+  btnPaymentsSales = null;
+  btnEntitiesSales = null;
+  btnProductsSales = null;
+  tabBuys = null;
+  btnOrdersBuys = null;
+  btnPaymentsBuys = null;
+  btnProductsBuys = null;
+  btnEntitiesBuys = null;
+  tabAll = null;
+  btnOrders = null;
+  btnPayments = null;
+  btnEntities = null;
+  btnProducts = null;
+  tabGL = null;
+  btnGLGroups = null;
+  btnGLChart = null;
+  btnGLTransactions = null;
+  tabConfig = null;
+  config_scroll = null;
+  config_pack = null;
+  btnOrdersSum = null;
+  btnSalesTaxRates = null;
+  btnOrderTypes = null;
+  btnPaymentTypes = null;
+  btnMeasureUnits = null;
+  btnWarrantyTypes = null;
+  btnImages = null;
+  btnProductGroups = null;
+  btnEntityGroups = null;
+  btnConfig = null;
+  btnOpenDB = null;
+  btnTranslations = null;
+  btnAppUsers = null;
+  btnAskForPrinter = null;
+  btnWebServer = null;
+  
+  constructor(px=10, py=50, pw=330, ph=320, pl=_tr("OURBIZ")){
+    base.constructor(px, py, pw, ph, pl);
+    // Create member functions and widgets
+    {
+      local o = Fl_Tabs(5, 5, 320, 310);
+      tabs = o;
+      o.labelcolor(7);
+      o.labelsize(16);
+      o.selection_color(4);
+      {
+        {
+          local o = Fl_Group(5, 35, 320, 280, _tr("Sales"));
+          tabSales = o;
+          o.labelsize(16);
+          o.color(127);
+          {
+            {
+              local o = Fl_Button(30, 50, 275, 55, _tr("Sales"));
+              btnOrdersSales = o;
+              o.align(16);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+              o.labelfont(3);
+              o.labelcolor(8);
+            }
+            {
+              local o = Fl_Button(30, 116, 275, 55, _tr("Payments"));
+              btnPaymentsSales = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+            {
+              local o = Fl_Button(30, 183, 275, 55, _tr("Customers"));
+              btnEntitiesSales = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+            {
+              local o = Fl_Button(30, 250, 275, 55, _tr("Products"));
+              btnProductsSales = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 35, 320, 280, _tr("Buys"));
+          tabBuys = o;
+          o.labelsize(16);
+          o.color(174);
+          {
+            {
+              local o = Fl_Button(30, 50, 275, 55, _tr("Buys"));
+              btnOrdersBuys = o;
+              o.align(16);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+              o.labelfont(3);
+              o.labelcolor(8);
+            }
+            {
+              local o = Fl_Button(30, 115, 275, 55, _tr("Payments"));
+              btnPaymentsBuys = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+            {
+              local o = Fl_Button(30, 250, 275, 55, _tr("Products"));
+              btnProductsBuys = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+            {
+              local o = Fl_Button(30, 183, 275, 55, _tr("Suppliers"));
+              btnEntitiesBuys = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 35, 320, 280, _tr("All"));
+          tabAll = o;
+          o.labelsize(16);
+          o.color(239);
+          {
+            {
+              local o = Fl_Button(30, 50, 275, 55, _tr("Orders"));
+              btnOrders = o;
+              o.align(16);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+              o.labelfont(3);
+              o.labelcolor(8);
+            }
+            {
+              local o = Fl_Button(30, 116, 275, 55, _tr("Payments"));
+              btnPayments = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+            {
+              local o = Fl_Button(30, 183, 275, 55, _tr("Entities"));
+              btnEntities = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+            {
+              local o = Fl_Button(30, 250, 275, 55, _tr("Products"));
+              btnProducts = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+          }
+          o.end();
+          Fl_Group.current().resizable(o);
+        }
+        {
+          local o = Fl_Group(5, 35, 320, 280, _tr("GL"));
+          tabGL = o;
+          o.labelsize(16);
+          o.color(132);
+          {
+            {
+              local o = Fl_Button(30, 50, 275, 55, _tr("Groups"));
+              btnGLGroups = o;
+              o.align(16);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+              o.labelfont(3);
+              o.labelcolor(8);
+            }
+            {
+              local o = Fl_Button(30, 115, 275, 55, _tr("Chart"));
+              btnGLChart = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+            {
+              local o = Fl_Button(30, 180, 275, 55, _tr("Transactions"));
+              btnGLTransactions = o;
+              o.labelcolor(8);
+              o.labelfont(3);
+              o.labeltype(FL_SHADOW_LABEL);
+              o.labelsize(34);
+            }
+          }
+          o.end();
+        }
+        {
+          local o = Fl_Group(5, 35, 320, 280, _tr("Config"));
+          tabConfig = o;
+          o.labelsize(16);
+          {
+            {
+              local o = Fl_Scroll(10, 45, 310, 265);
+              config_scroll = o;
+              o.labelsize(16);
+              {
+                {
+                  local o = Fl_Pack(30, 45, 270, 260);
+                  config_pack = o;
+                  o.labelsize(16);
+                  o->spacing(5);
+                  {
+                    {
+                      local o = Fl_Button(65, 55, 64, 30, _tr("Orders Sum"));
+                      btnOrdersSum = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(55, 45, 64, 30, _tr("Sales Tax Rates"));
+                      btnSalesTaxRates = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(65, 80, 64, 30, _tr("Order Types"));
+                      btnOrderTypes = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(105, 148, 64, 30, _tr("Payment Types"));
+                      btnPaymentTypes = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(115, 158, 64, 30, _tr("Measure Units"));
+                      btnMeasureUnits = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(125, 168, 64, 30, _tr("Warranty Types"));
+                      btnWarrantyTypes = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(75, 118, 64, 30, _tr("Images"));
+                      btnImages = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(85, 128, 64, 30, _tr("Product Groups"));
+                      btnProductGroups = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(95, 138, 64, 30, _tr("Entity Groups"));
+                      btnEntityGroups = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(105, 148, 64, 30, _tr("App Config"));
+                      btnConfig = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(115, 158, 64, 30, _tr("Open Database"));
+                      btnOpenDB = o;
+                      o.labelsize(16);
+                      o.tooltip(_tr("Open a database file"));
+                    }
+                    {
+                      local o = Fl_Button(115, 158, 64, 30, _tr("Translations"));
+                      btnTranslations = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Button(75, 65, 64, 30, _tr("App Users"));
+                      btnAppUsers = o;
+                      o.labelsize(16);
+                    }
+                    {
+                      local o = Fl_Check_Button(55, 70, 64, 15, _tr("Ask for Printer"));
+                      btnAskForPrinter = o;
+                      o.down_box(FL_DOWN_BOX);
+                    }
+                    {
+                      local o = Fl_Check_Button(65, 80, 64, 15, _tr("Web Server"));
+                      btnWebServer = o;
+                      o.down_box(FL_DOWN_BOX);
+                    }
+                  }
+                  o.end();
+                }
+              }
+              o.end();
+            }
+          }
+          o.end();
+        }
+      }
+      o.end();
+    }
+  }
+}
+