test-fltk-5.nut 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353
  1. function _tr(str){ return str;}
  2. class Fl_Data_Table extends Flv_Table {
  3. _forPrint = null;
  4. constructor(px, py, pw, ph, pl=""){
  5. base.constructor(px, py, pw, ph, pl);
  6. _forPrint=false;
  7. }
  8. }
  9. class Fl_Box_ClearLabel extends Fl_Box {
  10. constructor(px, py, pw, ph, pl=""){
  11. base.constructor(px, py, pw, ph, pl);
  12. }
  13. }
  14. class Flu_Combo_List extends Fl_Box {
  15. constructor(px, py, pw, ph, pl=""){
  16. base.constructor(px, py, pw, ph, pl);
  17. }
  18. }
  19. class Fl_Choice_Int extends Fl_Button {
  20. constructor(px, py, pw, ph, pl=""){
  21. base.constructor(px, py, pw, ph, pl);
  22. }
  23. }
  24. class Fl_Float_Input_Fmt extends Fl_Float_Input {
  25. constructor(px, py, pw, ph, pl=""){
  26. base.constructor(px, py, pw, ph, pl);
  27. }
  28. }
  29. class My_Fl_Float_Input extends Fl_Float_Input {
  30. constructor(px, py, pw, ph, pl=""){
  31. base.constructor(px, py, pw, ph, pl);
  32. }
  33. }
  34. class My_Fl_Return_Button extends Fl_Button {
  35. constructor(px, py, pw, ph, pl=""){
  36. base.constructor(px, py, pw, ph, pl);
  37. }
  38. }
  39. class Fl_Choice_Str extends Fl_Button {
  40. constructor(px, py, pw, ph, pl=""){
  41. base.constructor(px, py, pw, ph, pl);
  42. }
  43. }
  44. function add_input_field_to_map(tbl, fldname, fld){
  45. }
  46. //class BaseReportA4 extends Fl_Group {
  47. class BaseReportA4 extends Fl_Window {
  48. delivery_calc_window = 0;
  49. entities_list_window = 0;
  50. products_list_window = 0;
  51. calendar_window = 0;
  52. db_orders_mdate=null;
  53. pack_line2=null;
  54. db_orders_series=null;
  55. db_orders_order_number=null;
  56. db_orders_entity_id=null;
  57. db_orders_entity_name=null;
  58. btnSearchEntity=null;
  59. db_orders_entity_order_number=null;
  60. tabs=null;
  61. tabMain=null;
  62. pack_line3=null;
  63. out_lines=null;
  64. db_orders_weight_total=null;
  65. btnCalcDelivery=null;
  66. db_orders_payment_type_id=null;
  67. btnSortLines=null;
  68. db_orders_order_date=null;
  69. btnShowCalendar=null;
  70. group_totals=null;
  71. db_orders_discount_amt=null;
  72. db_orders_subtotal_amt=null;
  73. db_orders_sales_tax1_amt=null;
  74. db_orders_sales_tax2_amt=null;
  75. db_orders_irpf_amt=null;
  76. db_orders_total_amt=null;
  77. db_orders_cash=null;
  78. cash_return=null;
  79. linesTab=null;
  80. group_lines=null;
  81. db_orders_lines_batch_order_line_quantity=null;
  82. db_orders_lines_batch_order_line_id=null;
  83. btnSearchBatchOrderLineId=null;
  84. db_orders_lines_xref_order_line_quantity=null;
  85. db_orders_lines_xref_order_line_id=null;
  86. btnSearchXrefOrderLineId=null;
  87. db_orders_lines_product_id=null;
  88. db_orders_lines_description=null;
  89. btnSearchProduct=null;
  90. db_orders_lines_price_decimals=null;
  91. db_orders_lines_first_total=null;
  92. db_orders_lines_discount_amt=null;
  93. db_orders_lines_line_subtotal=null;
  94. db_orders_lines_sales_tax2_pct=null;
  95. db_orders_lines_sales_tax1_pct=null;
  96. db_orders_lines_sales_tax1_amt=null;
  97. db_orders_lines_line_total=null;
  98. tabLineNotes=null;
  99. db_orders_lines_notes=null;
  100. tabDues=null;
  101. grid_dues=null;
  102. due_id=null;
  103. due_date=null;
  104. btnShowCalendarDueDate=null;
  105. due_pct=null;
  106. due_amount=null;
  107. tabPayments=null;
  108. grid_payments=null;
  109. payment_id=null;
  110. payment_date=null;
  111. btnShowCalendarPaymentDate=null;
  112. payemnt_amount=null;
  113. tabDelivery=null;
  114. db_orders_entity_address=null;
  115. db_orders_entity_zip=null;
  116. db_orders_entity_city=null;
  117. db_orders_entity_state=null;
  118. db_orders_entity_country=null;
  119. db_orders_entity_phone=null;
  120. db_orders_entity_tax_number=null;
  121. db_orders_order_valid_till_date=null;
  122. btnShowCalendarValidTill=null;
  123. db_orders_entity_use_sales_tax2=null;
  124. db_orders_entity_sales_tax_exempt=null;
  125. db_orders_notes=null;
  126. db_orders_irpf_pct_retention=null;
  127. tabOptions=null;
  128. opt_ask_for_printer=null;
  129. opt_print_only_data=null;
  130. opt_print_to_pdf=null;
  131. opt_print_page_format=null;
  132. btnOptPrint=null;
  133. opt_email_program=null;
  134. opt_email_program_command=null;
  135. btnOptSendEmail=null;
  136. opt_print_order_company_info=null;
  137. opt_print_order_bottom_info=null;
  138. tabChartStatistics=null;
  139. tabHistory=null;
  140. tabPrintPreview=null;
  141. tabTotals=null;
  142. totals_balance=null;
  143. db_totals_overview_sales_quoted=null;
  144. db_totals_overview_sales_ordered=null;
  145. db_totals_overview_sales_delivered=null;
  146. db_totals_overview_sales_invoiced=null;
  147. db_totals_overview_sales_discount=null;
  148. db_totals_overview_sales_tax1=null;
  149. db_totals_overview_sales_tax2=null;
  150. db_totals_overview_sales_paid=null;
  151. db_totals_overview_buys_quoted=null;
  152. db_totals_overview_buys_ordered=null;
  153. db_totals_overview_buys_received=null;
  154. db_totals_overview_buys_invoiced=null;
  155. db_totals_overview_buys_discount=null;
  156. db_totals_overview_buys_tax1=null;
  157. db_totals_overview_buys_tax2=null;
  158. db_totals_overview_buys_paid=null;
  159. db_orders_order_type_id=null;
  160. grid_lines=null;
  161. btnPrint=null;
  162. db_orders_lines_quantity=null;
  163. db_orders_lines_price=null;
  164. db_orders_lines_weight=null;
  165. db_orders_lines_discount_pct=null;
  166. btnSaveLine=null;
  167. btnDueSave=null;
  168. btnPaymentSave=null;
  169. btnNumberOrder=null;
  170. dbAction=null;
  171. btnDbAction=null;
  172. btnRefreshTotals=null;
  173. constructor() {
  174. base.constructor(10, 50, 800, 560, _tr("Edit Order"));
  175. begin();
  176. this->box(FL_FLAT_BOX);
  177. this->color(FL_BACKGROUND_COLOR);
  178. this->selection_color(FL_BACKGROUND_COLOR);
  179. this->labeltype(FL_NO_LABEL);
  180. this->labelfont(0);
  181. this->labelsize(16);
  182. this->labelcolor(FL_FOREGROUND_COLOR);
  183. this->align((FL_ALIGN_TOP));
  184. this->when(FL_WHEN_RELEASE);
  185. delivery_calc_window = 0;
  186. entities_list_window = 0;
  187. products_list_window = 0;
  188. calendar_window = 0;
  189. { local o = new Fl_Group(5, 1, 792, 62);
  190. { db_orders_mdate = new Fl_Output(670, 5, 125, 25);
  191. db_orders_mdate->labeltype(FL_NO_LABEL);
  192. db_orders_mdate->labelsize(16);
  193. db_orders_mdate->textsize(16);
  194. add_input_field_to_map("orders", "mdate", db_orders_mdate);
  195. } // Fl_Output* db_orders_mdate
  196. { db_orders_order_type_id = new Flu_Combo_List(5, 5, 655, 25);
  197. db_orders_order_type_id->tooltip(_tr("Selection of the order type"));
  198. db_orders_order_type_id->box(FL_DOWN_BOX);
  199. db_orders_order_type_id->color(FL_BACKGROUND_COLOR);
  200. db_orders_order_type_id->selection_color(FL_BACKGROUND_COLOR);
  201. db_orders_order_type_id->labeltype(FL_NO_LABEL);
  202. db_orders_order_type_id->labelfont(1);
  203. db_orders_order_type_id->labelsize(16);
  204. db_orders_order_type_id->labelcolor(FL_FOREGROUND_COLOR);
  205. db_orders_order_type_id->align((FL_ALIGN_CENTER));
  206. db_orders_order_type_id->when(FL_WHEN_RELEASE);
  207. add_input_field_to_map("orders", "order_type_id", db_orders_order_type_id);
  208. } // Flu_Combo_List* db_orders_order_type_id
  209. { local o = pack_line2 = new Fl_Pack(5, 35, 790, 25);
  210. pack_line2->type(1);
  211. pack_line2->labelsize(16);
  212. { db_orders_series = new Fl_Input(55, 35, 45, 25, _tr("Series"));
  213. db_orders_series->labelsize(16);
  214. db_orders_series->textsize(16);
  215. add_input_field_to_map("orders", "series", db_orders_series);
  216. } // Fl_Input* db_orders_series
  217. { local o = db_orders_order_number = new Fl_Int_Input(172, 35, 95, 25, _tr("Number"));
  218. db_orders_order_number->type(2);
  219. db_orders_order_number->labelsize(16);
  220. db_orders_order_number->textsize(16);
  221. add_input_field_to_map("orders", "order_number", db_orders_order_number);
  222. o->use_numeric_format(0);
  223. } // Fl_Int_Input* db_orders_order_number
  224. { db_orders_entity_id = new Fl_Int_Input(319, 35, 95, 25, _tr("Entity"));
  225. db_orders_entity_id->type(2);
  226. db_orders_entity_id->labelsize(16);
  227. db_orders_entity_id->textsize(16);
  228. add_input_field_to_map("orders", "entity_id", db_orders_entity_id);
  229. } // Fl_Int_Input* db_orders_entity_id
  230. { db_orders_entity_name = new Fl_Input(420, 35, 335, 25);
  231. db_orders_entity_name->tooltip(_tr("Type partal description to search on availlable entities"));
  232. db_orders_entity_name->labeltype(FL_NO_LABEL);
  233. db_orders_entity_name->labelsize(16);
  234. db_orders_entity_name->textfont(1);
  235. db_orders_entity_name->textsize(16);
  236. Fl_Group.current()->resizable(db_orders_entity_name);
  237. add_input_field_to_map("orders", "entity_name", db_orders_entity_name);
  238. } // Fl_Input* db_orders_entity_name
  239. { btnSearchEntity = new Fl_Button(765, 35, 30, 25, _tr("@<->"));
  240. btnSearchEntity->tooltip(_tr("Show entities search window"));
  241. btnSearchEntity->labelsize(18);
  242. btnSearchEntity->labelcolor(22);
  243. } // Fl_Button* btnSearchEntity
  244. o->spacing(5);
  245. o->with_label(1);
  246. pack_line2->end();
  247. } // Fl_Pack* pack_line2
  248. o->end();
  249. } // Fl_Group* o
  250. { db_orders_entity_order_number = new Fl_Input(585, 65, 210, 25, _tr("Their Nº"));
  251. db_orders_entity_order_number->labelsize(16);
  252. db_orders_entity_order_number->textsize(16);
  253. add_input_field_to_map("orders", "entity_order_number", db_orders_entity_order_number);
  254. } // Fl_Input* db_orders_entity_order_number
  255. { tabs = new Fl_Tabs(5, 68, 790, 487);
  256. tabs->selection_color(4);
  257. tabs->labelsize(16);
  258. tabs->labelcolor(FL_BACKGROUND2_COLOR);
  259. { tabMain = new Fl_Group(5, 95, 790, 460, _tr("Main"));
  260. tabMain->color(246);
  261. tabMain->labelfont(2);
  262. tabMain->labelsize(16);
  263. { local o = pack_line3 = new Fl_Pack(11, 105, 780, 25);
  264. pack_line3->type(1);
  265. pack_line3->labelsize(16);
  266. { local o = out_lines = new Fl_Output(57, 105, 69, 25, _tr("Lines"));
  267. out_lines->labelsize(16);
  268. out_lines->textsize(16);
  269. o->right_to_left(1);
  270. } // Fl_Output* out_lines
  271. { local o = db_orders_weight_total = new Fl_Output(189, 105, 110, 25, _tr("Weight"));
  272. db_orders_weight_total->labelsize(16);
  273. db_orders_weight_total->textsize(16);
  274. o->right_to_left(1);
  275. o->decimal_places(-2);
  276. o->use_numeric_format(1);
  277. } // Fl_Output* db_orders_weight_total
  278. { btnCalcDelivery = new Fl_Button(309, 105, 30, 25, _tr("@<->"));
  279. btnCalcDelivery->tooltip(_tr("Show delivery calc window"));
  280. btnCalcDelivery->labelsize(18);
  281. btnCalcDelivery->labelcolor(22);
  282. } // Fl_Button* btnCalcDelivery
  283. { db_orders_payment_type_id = new Fl_Choice_Int(345, 105, 235, 25);
  284. db_orders_payment_type_id->box(FL_FLAT_BOX);
  285. db_orders_payment_type_id->down_box(FL_BORDER_BOX);
  286. db_orders_payment_type_id->color(FL_BACKGROUND_COLOR);
  287. db_orders_payment_type_id->selection_color(FL_SELECTION_COLOR);
  288. db_orders_payment_type_id->labeltype(FL_NO_LABEL);
  289. db_orders_payment_type_id->labelfont(0);
  290. db_orders_payment_type_id->labelsize(16);
  291. db_orders_payment_type_id->labelcolor(FL_FOREGROUND_COLOR);
  292. db_orders_payment_type_id->textfont(1);
  293. db_orders_payment_type_id->textsize(16);
  294. db_orders_payment_type_id->align((FL_ALIGN_LEFT));
  295. db_orders_payment_type_id->when(FL_WHEN_RELEASE);
  296. Fl_Group.current()->resizable(db_orders_payment_type_id);
  297. add_input_field_to_map("orders", "payment_type_id", db_orders_payment_type_id);
  298. } // Fl_Choice_Int* db_orders_payment_type_id
  299. { btnSortLines = new Fl_Button(590, 105, 30, 25, _tr("@2"));
  300. btnSortLines->tooltip(_tr("Sort lines by description"));
  301. btnSortLines->labelsize(18);
  302. btnSortLines->labelcolor(22);
  303. } // Fl_Button* btnSortLines
  304. { db_orders_order_date = new Fl_Input(629, 105, 120, 25);
  305. db_orders_order_date->labeltype(FL_NO_LABEL);
  306. db_orders_order_date->labelsize(16);
  307. db_orders_order_date->textfont(1);
  308. db_orders_order_date->textsize(16);
  309. add_input_field_to_map("orders", "order_date", db_orders_order_date);
  310. } // Fl_Input* db_orders_order_date
  311. { btnShowCalendar = new Fl_Button(760, 105, 30, 25, _tr("@<->"));
  312. btnShowCalendar->tooltip(_tr("Show calendar"));
  313. btnShowCalendar->labelsize(18);
  314. btnShowCalendar->labelcolor(22);
  315. } // Fl_Button* btnShowCalendar
  316. o->spacing(5);
  317. o->with_label(1);
  318. pack_line3->end();
  319. } // Fl_Pack* pack_line3
  320. { grid_lines = new Fl_Data_Table(10, 135, 780, 150);
  321. grid_lines->resize(10, 135, 780, 150);
  322. grid_lines->box(FL_NO_BOX);
  323. grid_lines->color(FL_BACKGROUND2_COLOR);
  324. grid_lines->selection_color(FL_SELECTION_COLOR);
  325. grid_lines->labeltype(FL_NORMAL_LABEL);
  326. grid_lines->labelfont(0);
  327. grid_lines->labelsize(16);
  328. grid_lines->labelcolor(FL_FOREGROUND_COLOR);
  329. grid_lines->textsize(16);
  330. grid_lines->align((FL_ALIGN_BOTTOM));
  331. grid_lines->when(FL_WHEN_RELEASE_ALWAYS);
  332. Fl_Group.current()->resizable(grid_lines);
  333. } // Fl_Data_Table* grid_lines
  334. { local o = new Fl_Group(10, 290, 781, 260);
  335. { group_totals = new Fl_Group(600, 291, 190, 259);
  336. group_totals->box(FL_UP_BOX);
  337. group_totals->color(174);
  338. { local o = db_orders_discount_amt = new Fl_Output(685, 297, 100, 25, _tr("Discount"));
  339. db_orders_discount_amt->labelsize(16);
  340. db_orders_discount_amt->textsize(16);
  341. o->right_to_left(1);
  342. o->use_numeric_format(1);
  343. add_input_field_to_map("orders", "discount_amt", db_orders_discount_amt);
  344. } // Fl_Output* db_orders_discount_amt
  345. { local o = db_orders_subtotal_amt = new Fl_Output(684, 326, 100, 25, _tr("Subtotal"));
  346. db_orders_subtotal_amt->labelsize(16);
  347. db_orders_subtotal_amt->textsize(16);
  348. o->right_to_left(1);
  349. o->use_numeric_format(1);
  350. add_input_field_to_map("orders", "subtotal_amt", db_orders_subtotal_amt);
  351. } // Fl_Output* db_orders_subtotal_amt
  352. { local o = db_orders_sales_tax1_amt = new Fl_Output(685, 356, 100, 25, _tr("V.A.T."));
  353. db_orders_sales_tax1_amt->labelsize(16);
  354. db_orders_sales_tax1_amt->textsize(16);
  355. o->right_to_left(1);
  356. o->use_numeric_format(1);
  357. add_input_field_to_map("orders", "sales_tax1_amt", db_orders_sales_tax1_amt);
  358. } // Fl_Output* db_orders_sales_tax1_amt
  359. { local o = db_orders_sales_tax2_amt = new Fl_Output(684, 386, 100, 25, _tr("R.E."));
  360. db_orders_sales_tax2_amt->labelsize(16);
  361. db_orders_sales_tax2_amt->textsize(16);
  362. o->right_to_left(1);
  363. o->use_numeric_format(1);
  364. add_input_field_to_map("orders", "sales_tax2_amt", db_orders_sales_tax2_amt);
  365. } // Fl_Output* db_orders_sales_tax2_amt
  366. { local o = db_orders_irpf_amt = new Fl_Output(685, 416, 100, 25, _tr("I.R.P.F."));
  367. db_orders_irpf_amt->labelsize(16);
  368. db_orders_irpf_amt->textsize(16);
  369. o->right_to_left(1);
  370. o->use_numeric_format(1);
  371. add_input_field_to_map("orders", "irpf_amt", db_orders_irpf_amt);
  372. } // Fl_Output* db_orders_irpf_amt
  373. { local o = db_orders_total_amt = new Fl_Output(610, 453, 174, 33, _tr("Total"));
  374. db_orders_total_amt->color(119);
  375. db_orders_total_amt->labelfont(1);
  376. db_orders_total_amt->textfont(1);
  377. db_orders_total_amt->textsize(30);
  378. db_orders_total_amt->align((FL_ALIGN_TOP_LEFT));
  379. o->right_to_left(1);
  380. o->use_numeric_format(1);
  381. add_input_field_to_map("orders", "total_amt", db_orders_total_amt);
  382. } // Fl_Output* db_orders_total_amt
  383. { db_orders_cash = new Fl_Float_Input_Fmt(685, 490, 100, 25, _tr("Cash"));
  384. db_orders_cash->type(1);
  385. db_orders_cash->box(FL_DOWN_BOX);
  386. db_orders_cash->color(FL_BACKGROUND2_COLOR);
  387. db_orders_cash->selection_color(FL_SELECTION_COLOR);
  388. db_orders_cash->labeltype(FL_NORMAL_LABEL);
  389. db_orders_cash->labelfont(1);
  390. db_orders_cash->labelsize(16);
  391. db_orders_cash->labelcolor(FL_FOREGROUND_COLOR);
  392. db_orders_cash->textfont(1);
  393. db_orders_cash->textsize(16);
  394. db_orders_cash->align((FL_ALIGN_LEFT));
  395. db_orders_cash->when(FL_WHEN_RELEASE);
  396. add_input_field_to_map("orders", "cash", db_orders_cash);
  397. } // Fl_Float_Input_Fmt* db_orders_cash
  398. { local o = cash_return = new Fl_Output(685, 520, 100, 25, _tr("Return"));
  399. cash_return->labelfont(1);
  400. cash_return->labelsize(16);
  401. cash_return->textfont(1);
  402. cash_return->textsize(16);
  403. o->right_to_left(1);
  404. o->use_numeric_format(1);
  405. } // Fl_Output* cash_return
  406. group_totals->end();
  407. } // Fl_Group* group_totals
  408. { btnPrint = new My_Fl_Return_Button(485, 525, 100, 25, _tr("Print"));
  409. btnPrint->box(FL_UP_BOX);
  410. btnPrint->color(FL_BACKGROUND_COLOR);
  411. btnPrint->selection_color(FL_BACKGROUND_COLOR);
  412. btnPrint->labeltype(FL_NORMAL_LABEL);
  413. btnPrint->labelfont(0);
  414. btnPrint->labelsize(16);
  415. btnPrint->labelcolor(FL_FOREGROUND_COLOR);
  416. btnPrint->align((FL_ALIGN_CENTER));
  417. btnPrint->when(FL_WHEN_RELEASE);
  418. } // My_Fl_Return_Button* btnPrint
  419. { linesTab = new Fl_Tabs(10, 290, 585, 230);
  420. linesTab->selection_color(4);
  421. linesTab->labelfont(2);
  422. linesTab->labelsize(16);
  423. linesTab->labelcolor(FL_BACKGROUND2_COLOR);
  424. { group_lines = new Fl_Group(10, 321, 585, 199, _tr("Line Edit"));
  425. group_lines->box(FL_UP_BOX);
  426. group_lines->color(166);
  427. group_lines->labelfont(2);
  428. group_lines->labelsize(16);
  429. { local o = db_orders_lines_batch_order_line_quantity = new Fl_Output(265, 330, 110, 25, _tr("Batch Qty."));
  430. db_orders_lines_batch_order_line_quantity->labelsize(16);
  431. db_orders_lines_batch_order_line_quantity->textsize(16);
  432. o->right_to_left(1);
  433. add_input_field_to_map("orders_lines", "batch_order_line_quantity", db_orders_lines_batch_order_line_quantity);
  434. } // Fl_Output* db_orders_lines_batch_order_line_quantity
  435. { db_orders_lines_batch_order_line_id = new Fl_Int_Input(435, 329, 110, 25, _tr("Batch #"));
  436. db_orders_lines_batch_order_line_id->type(2);
  437. db_orders_lines_batch_order_line_id->labelsize(16);
  438. db_orders_lines_batch_order_line_id->textsize(16);
  439. add_input_field_to_map("orders_lines", "batch_order_line_id", db_orders_lines_batch_order_line_id);
  440. } // Fl_Int_Input* db_orders_lines_batch_order_line_id
  441. { btnSearchBatchOrderLineId = new Fl_Button(555, 329, 30, 25, _tr("@<->"));
  442. btnSearchBatchOrderLineId->tooltip(_tr("Show products search window"));
  443. btnSearchBatchOrderLineId->labelsize(18);
  444. btnSearchBatchOrderLineId->labelcolor(22);
  445. } // Fl_Button* btnSearchBatchOrderLineId
  446. { local o = db_orders_lines_xref_order_line_quantity = new Fl_Output(265, 360, 110, 25, _tr("XRef. Qty."));
  447. db_orders_lines_xref_order_line_quantity->labelsize(16);
  448. db_orders_lines_xref_order_line_quantity->textsize(16);
  449. o->right_to_left(1);
  450. add_input_field_to_map("orders_lines", "xref_order_line_quantity", db_orders_lines_xref_order_line_quantity);
  451. } // Fl_Output* db_orders_lines_xref_order_line_quantity
  452. { db_orders_lines_xref_order_line_id = new Fl_Int_Input(435, 359, 110, 25, _tr("XRef #"));
  453. db_orders_lines_xref_order_line_id->type(2);
  454. db_orders_lines_xref_order_line_id->labelsize(16);
  455. db_orders_lines_xref_order_line_id->textsize(16);
  456. add_input_field_to_map("orders_lines", "xref_order_line_id", db_orders_lines_xref_order_line_id);
  457. } // Fl_Int_Input* db_orders_lines_xref_order_line_id
  458. { btnSearchXrefOrderLineId = new Fl_Button(555, 359, 30, 25, _tr("@<->"));
  459. btnSearchXrefOrderLineId->tooltip(_tr("Show products search window"));
  460. btnSearchXrefOrderLineId->labelsize(18);
  461. btnSearchXrefOrderLineId->labelcolor(22);
  462. } // Fl_Button* btnSearchXrefOrderLineId
  463. { db_orders_lines_product_id = new Fl_Int_Input(21, 387, 70, 25, _tr("Code"));
  464. db_orders_lines_product_id->type(2);
  465. db_orders_lines_product_id->labelsize(16);
  466. db_orders_lines_product_id->textsize(16);
  467. db_orders_lines_product_id->align((FL_ALIGN_TOP_LEFT));
  468. add_input_field_to_map("orders_lines", "product_id", db_orders_lines_product_id);
  469. } // Fl_Int_Input* db_orders_lines_product_id
  470. { db_orders_lines_description = new Fl_Input(101, 387, 444, 25, _tr("Description"));
  471. db_orders_lines_description->tooltip(_tr("Type partal description to search on availlable products"));
  472. db_orders_lines_description->labelsize(16);
  473. db_orders_lines_description->textfont(1);
  474. db_orders_lines_description->textsize(16);
  475. db_orders_lines_description->align((FL_ALIGN_TOP_LEFT));
  476. add_input_field_to_map("orders_lines", "description", db_orders_lines_description);
  477. } // Fl_Input* db_orders_lines_description
  478. { btnSearchProduct = new Fl_Button(555, 387, 30, 25, _tr("@<->"));
  479. btnSearchProduct->tooltip(_tr("Show products search window"));
  480. btnSearchProduct->labelsize(18);
  481. btnSearchProduct->labelcolor(22);
  482. } // Fl_Button* btnSearchProduct
  483. { local o = db_orders_lines_quantity = new My_Fl_Float_Input(21, 435, 84, 25, _tr("Quantity"));
  484. db_orders_lines_quantity->type(1);
  485. db_orders_lines_quantity->box(FL_DOWN_BOX);
  486. db_orders_lines_quantity->color(FL_BACKGROUND2_COLOR);
  487. db_orders_lines_quantity->selection_color(FL_SELECTION_COLOR);
  488. db_orders_lines_quantity->labeltype(FL_NORMAL_LABEL);
  489. db_orders_lines_quantity->labelfont(1);
  490. db_orders_lines_quantity->labelsize(16);
  491. db_orders_lines_quantity->labelcolor(FL_FOREGROUND_COLOR);
  492. db_orders_lines_quantity->textfont(1);
  493. db_orders_lines_quantity->textsize(16);
  494. db_orders_lines_quantity->align((FL_ALIGN_TOP_LEFT));
  495. db_orders_lines_quantity->when(FL_WHEN_RELEASE);
  496. o->decimal_places(-6);
  497. add_input_field_to_map("orders_lines", "quantity", db_orders_lines_quantity);
  498. } // My_Fl_Float_Input* db_orders_lines_quantity
  499. { db_orders_lines_price = new My_Fl_Float_Input(115, 435, 108, 25, _tr("Price"));
  500. db_orders_lines_price->type(1);
  501. db_orders_lines_price->box(FL_DOWN_BOX);
  502. db_orders_lines_price->color(FL_BACKGROUND2_COLOR);
  503. db_orders_lines_price->selection_color(FL_SELECTION_COLOR);
  504. db_orders_lines_price->labeltype(FL_NORMAL_LABEL);
  505. db_orders_lines_price->labelfont(1);
  506. db_orders_lines_price->labelsize(16);
  507. db_orders_lines_price->labelcolor(FL_FOREGROUND_COLOR);
  508. db_orders_lines_price->textfont(1);
  509. db_orders_lines_price->textsize(16);
  510. db_orders_lines_price->align((FL_ALIGN_TOP_LEFT));
  511. db_orders_lines_price->when(FL_WHEN_RELEASE);
  512. add_input_field_to_map("orders_lines", "price", db_orders_lines_price);
  513. } // My_Fl_Float_Input* db_orders_lines_price
  514. { db_orders_lines_price_decimals = new Fl_Int_Input(230, 435, 20, 25, _tr("(.)"));
  515. db_orders_lines_price_decimals->tooltip(_tr("Number of decimals to use on calculations"));
  516. db_orders_lines_price_decimals->type(2);
  517. db_orders_lines_price_decimals->labelsize(16);
  518. db_orders_lines_price_decimals->textsize(16);
  519. db_orders_lines_price_decimals->align((FL_ALIGN_TOP));
  520. add_input_field_to_map("orders_lines", "price_decimals", db_orders_lines_price_decimals);
  521. } // Fl_Int_Input* db_orders_lines_price_decimals
  522. { local o = db_orders_lines_weight = new My_Fl_Float_Input(255, 435, 70, 25, _tr("Weight"));
  523. db_orders_lines_weight->type(1);
  524. db_orders_lines_weight->box(FL_DOWN_BOX);
  525. db_orders_lines_weight->color(FL_BACKGROUND2_COLOR);
  526. db_orders_lines_weight->selection_color(FL_SELECTION_COLOR);
  527. db_orders_lines_weight->labeltype(FL_NORMAL_LABEL);
  528. db_orders_lines_weight->labelfont(0);
  529. db_orders_lines_weight->labelsize(16);
  530. db_orders_lines_weight->labelcolor(FL_FOREGROUND_COLOR);
  531. db_orders_lines_weight->textsize(16);
  532. db_orders_lines_weight->align((FL_ALIGN_TOP_LEFT));
  533. db_orders_lines_weight->when(FL_WHEN_RELEASE);
  534. o->decimal_places(-6);
  535. add_input_field_to_map("orders_lines", "weight", db_orders_lines_weight);
  536. } // My_Fl_Float_Input* db_orders_lines_weight
  537. { db_orders_lines_first_total = new Fl_Float_Input_Fmt(330, 435, 100, 25, _tr("1st total"));
  538. db_orders_lines_first_total->type(1);
  539. db_orders_lines_first_total->box(FL_DOWN_BOX);
  540. db_orders_lines_first_total->color(FL_BACKGROUND2_COLOR);
  541. db_orders_lines_first_total->selection_color(FL_SELECTION_COLOR);
  542. db_orders_lines_first_total->labeltype(FL_NORMAL_LABEL);
  543. db_orders_lines_first_total->labelfont(0);
  544. db_orders_lines_first_total->labelsize(16);
  545. db_orders_lines_first_total->labelcolor(FL_FOREGROUND_COLOR);
  546. db_orders_lines_first_total->textsize(16);
  547. db_orders_lines_first_total->align((FL_ALIGN_TOP_LEFT));
  548. db_orders_lines_first_total->when(FL_WHEN_RELEASE);
  549. add_input_field_to_map("orders_lines", "first_total", db_orders_lines_first_total);
  550. } // Fl_Float_Input_Fmt* db_orders_lines_first_total
  551. { db_orders_lines_discount_pct = new My_Fl_Float_Input(435, 435, 60, 25, _tr("Disc. %"));
  552. db_orders_lines_discount_pct->type(1);
  553. db_orders_lines_discount_pct->box(FL_DOWN_BOX);
  554. db_orders_lines_discount_pct->color(FL_BACKGROUND2_COLOR);
  555. db_orders_lines_discount_pct->selection_color(FL_SELECTION_COLOR);
  556. db_orders_lines_discount_pct->labeltype(FL_NORMAL_LABEL);
  557. db_orders_lines_discount_pct->labelfont(0);
  558. db_orders_lines_discount_pct->labelsize(16);
  559. db_orders_lines_discount_pct->labelcolor(FL_FOREGROUND_COLOR);
  560. db_orders_lines_discount_pct->textsize(16);
  561. db_orders_lines_discount_pct->align((FL_ALIGN_TOP_LEFT));
  562. db_orders_lines_discount_pct->when(FL_WHEN_RELEASE);
  563. add_input_field_to_map("orders_lines", "discount_pct", db_orders_lines_discount_pct);
  564. } // My_Fl_Float_Input* db_orders_lines_discount_pct
  565. { db_orders_lines_discount_amt = new Fl_Float_Input_Fmt(505, 435, 80, 25, _tr("Disc. $"));
  566. db_orders_lines_discount_amt->type(1);
  567. db_orders_lines_discount_amt->box(FL_DOWN_BOX);
  568. db_orders_lines_discount_amt->color(FL_BACKGROUND2_COLOR);
  569. db_orders_lines_discount_amt->selection_color(FL_SELECTION_COLOR);
  570. db_orders_lines_discount_amt->labeltype(FL_NORMAL_LABEL);
  571. db_orders_lines_discount_amt->labelfont(0);
  572. db_orders_lines_discount_amt->labelsize(16);
  573. db_orders_lines_discount_amt->labelcolor(FL_FOREGROUND_COLOR);
  574. db_orders_lines_discount_amt->textsize(16);
  575. db_orders_lines_discount_amt->align((FL_ALIGN_TOP_LEFT));
  576. db_orders_lines_discount_amt->when(FL_WHEN_RELEASE);
  577. add_input_field_to_map("orders_lines", "discount_amt", db_orders_lines_discount_amt);
  578. } // Fl_Float_Input_Fmt* db_orders_lines_discount_amt
  579. { db_orders_lines_line_subtotal = new Fl_Float_Input_Fmt(21, 485, 108, 25, _tr("Subtotal"));
  580. db_orders_lines_line_subtotal->type(1);
  581. db_orders_lines_line_subtotal->box(FL_DOWN_BOX);
  582. db_orders_lines_line_subtotal->color(FL_BACKGROUND2_COLOR);
  583. db_orders_lines_line_subtotal->selection_color(FL_SELECTION_COLOR);
  584. db_orders_lines_line_subtotal->labeltype(FL_NORMAL_LABEL);
  585. db_orders_lines_line_subtotal->labelfont(0);
  586. db_orders_lines_line_subtotal->labelsize(16);
  587. db_orders_lines_line_subtotal->labelcolor(FL_FOREGROUND_COLOR);
  588. db_orders_lines_line_subtotal->textsize(16);
  589. db_orders_lines_line_subtotal->align((FL_ALIGN_TOP_LEFT));
  590. db_orders_lines_line_subtotal->when(FL_WHEN_RELEASE);
  591. add_input_field_to_map("orders_lines", "line_subtotal", db_orders_lines_line_subtotal);
  592. } // Fl_Float_Input_Fmt* db_orders_lines_line_subtotal
  593. { db_orders_lines_sales_tax2_pct = new Fl_Float_Input_Fmt(139, 485, 64, 25, _tr("R.E. %"));
  594. db_orders_lines_sales_tax2_pct->type(1);
  595. db_orders_lines_sales_tax2_pct->box(FL_DOWN_BOX);
  596. db_orders_lines_sales_tax2_pct->color(FL_BACKGROUND2_COLOR);
  597. db_orders_lines_sales_tax2_pct->selection_color(FL_SELECTION_COLOR);
  598. db_orders_lines_sales_tax2_pct->labeltype(FL_NORMAL_LABEL);
  599. db_orders_lines_sales_tax2_pct->labelfont(0);
  600. db_orders_lines_sales_tax2_pct->labelsize(16);
  601. db_orders_lines_sales_tax2_pct->labelcolor(FL_FOREGROUND_COLOR);
  602. db_orders_lines_sales_tax2_pct->textsize(16);
  603. db_orders_lines_sales_tax2_pct->align((FL_ALIGN_TOP_LEFT));
  604. db_orders_lines_sales_tax2_pct->when(FL_WHEN_RELEASE);
  605. add_input_field_to_map("orders_lines", "sales_tax2_pct", db_orders_lines_sales_tax2_pct);
  606. } // Fl_Float_Input_Fmt* db_orders_lines_sales_tax2_pct
  607. { db_orders_lines_sales_tax1_pct = new Fl_Float_Input_Fmt(213, 485, 64, 25, _tr("V.A.T. %"));
  608. db_orders_lines_sales_tax1_pct->type(1);
  609. db_orders_lines_sales_tax1_pct->box(FL_DOWN_BOX);
  610. db_orders_lines_sales_tax1_pct->color(FL_BACKGROUND2_COLOR);
  611. db_orders_lines_sales_tax1_pct->selection_color(FL_SELECTION_COLOR);
  612. db_orders_lines_sales_tax1_pct->labeltype(FL_NORMAL_LABEL);
  613. db_orders_lines_sales_tax1_pct->labelfont(0);
  614. db_orders_lines_sales_tax1_pct->labelsize(16);
  615. db_orders_lines_sales_tax1_pct->labelcolor(FL_FOREGROUND_COLOR);
  616. db_orders_lines_sales_tax1_pct->textsize(16);
  617. db_orders_lines_sales_tax1_pct->align((FL_ALIGN_TOP_LEFT));
  618. db_orders_lines_sales_tax1_pct->when(FL_WHEN_RELEASE);
  619. add_input_field_to_map("orders_lines", "sales_tax1_pct", db_orders_lines_sales_tax1_pct);
  620. } // Fl_Float_Input_Fmt* db_orders_lines_sales_tax1_pct
  621. { db_orders_lines_sales_tax1_amt = new Fl_Float_Input_Fmt(287, 485, 87, 25, _tr("V.A.T. $"));
  622. db_orders_lines_sales_tax1_amt->type(1);
  623. db_orders_lines_sales_tax1_amt->box(FL_DOWN_BOX);
  624. db_orders_lines_sales_tax1_amt->color(FL_BACKGROUND2_COLOR);
  625. db_orders_lines_sales_tax1_amt->selection_color(FL_SELECTION_COLOR);
  626. db_orders_lines_sales_tax1_amt->labeltype(FL_NORMAL_LABEL);
  627. db_orders_lines_sales_tax1_amt->labelfont(0);
  628. db_orders_lines_sales_tax1_amt->labelsize(16);
  629. db_orders_lines_sales_tax1_amt->labelcolor(FL_FOREGROUND_COLOR);
  630. db_orders_lines_sales_tax1_amt->textsize(16);
  631. db_orders_lines_sales_tax1_amt->align((FL_ALIGN_TOP_LEFT));
  632. db_orders_lines_sales_tax1_amt->when(FL_WHEN_RELEASE);
  633. add_input_field_to_map("orders_lines", "sales_tax1_amt", db_orders_lines_sales_tax1_amt);
  634. } // Fl_Float_Input_Fmt* db_orders_lines_sales_tax1_amt
  635. { btnSaveLine = new My_Fl_Return_Button(384, 485, 83, 25, _tr("Save"));
  636. btnSaveLine->tooltip(_tr("Save the line currently edited"));
  637. btnSaveLine->box(FL_UP_BOX);
  638. btnSaveLine->color(FL_BACKGROUND_COLOR);
  639. btnSaveLine->selection_color(FL_BACKGROUND_COLOR);
  640. btnSaveLine->labeltype(FL_NORMAL_LABEL);
  641. btnSaveLine->labelfont(1);
  642. btnSaveLine->labelsize(16);
  643. btnSaveLine->labelcolor(FL_FOREGROUND_COLOR);
  644. btnSaveLine->align((FL_ALIGN_CENTER));
  645. btnSaveLine->when(FL_WHEN_RELEASE);
  646. } // My_Fl_Return_Button* btnSaveLine
  647. { db_orders_lines_line_total = new Fl_Float_Input_Fmt(477, 485, 108, 25, _tr("Total"));
  648. db_orders_lines_line_total->type(1);
  649. db_orders_lines_line_total->box(FL_DOWN_BOX);
  650. db_orders_lines_line_total->color(FL_BACKGROUND2_COLOR);
  651. db_orders_lines_line_total->selection_color(FL_SELECTION_COLOR);
  652. db_orders_lines_line_total->labeltype(FL_NORMAL_LABEL);
  653. db_orders_lines_line_total->labelfont(1);
  654. db_orders_lines_line_total->labelsize(16);
  655. db_orders_lines_line_total->labelcolor(FL_FOREGROUND_COLOR);
  656. db_orders_lines_line_total->textfont(1);
  657. db_orders_lines_line_total->textsize(16);
  658. db_orders_lines_line_total->align((FL_ALIGN_TOP_LEFT));
  659. db_orders_lines_line_total->when(FL_WHEN_RELEASE);
  660. add_input_field_to_map("orders_lines", "line_total", db_orders_lines_line_total);
  661. } // Fl_Float_Input_Fmt* db_orders_lines_line_total
  662. group_lines->end();
  663. } // Fl_Group* group_lines
  664. { tabLineNotes = new Fl_Group(10, 320, 585, 200, _tr("Line Notes"));
  665. tabLineNotes->labelfont(2);
  666. tabLineNotes->labelsize(16);
  667. tabLineNotes->hide();
  668. { db_orders_lines_notes = new Fl_Input(80, 330, 505, 180, _tr("Notes"));
  669. db_orders_lines_notes->tooltip(_tr("Type partal description to search on availlable products"));
  670. db_orders_lines_notes->type(4);
  671. db_orders_lines_notes->labelsize(16);
  672. db_orders_lines_notes->textsize(16);
  673. add_input_field_to_map("orders_lines", "notes", db_orders_lines_notes);
  674. } // Fl_Input* db_orders_lines_notes
  675. tabLineNotes->end();
  676. } // Fl_Group* tabLineNotes
  677. { tabDues = new Fl_Group(10, 320, 585, 200, _tr("Dues"));
  678. tabDues->labelfont(2);
  679. tabDues->labelsize(16);
  680. tabDues->hide();
  681. { grid_dues = new Fl_Data_Table(15, 330, 575, 130);
  682. grid_dues->box(FL_NO_BOX);
  683. grid_dues->color(FL_BACKGROUND2_COLOR);
  684. grid_dues->selection_color(FL_SELECTION_COLOR);
  685. grid_dues->labeltype(FL_NORMAL_LABEL);
  686. grid_dues->labelfont(0);
  687. grid_dues->labelsize(16);
  688. grid_dues->labelcolor(FL_FOREGROUND_COLOR);
  689. grid_dues->textsize(16);
  690. grid_dues->align((FL_ALIGN_BOTTOM));
  691. grid_dues->when(FL_WHEN_RELEASE_ALWAYS);
  692. } // Fl_Data_Table* grid_dues
  693. { local o = due_id = new Fl_Output(15, 485, 80, 25, _tr("ID"));
  694. due_id->labelsize(16);
  695. due_id->textsize(16);
  696. due_id->align((FL_ALIGN_TOP_LEFT));
  697. o->right_to_left(1);
  698. } // Fl_Output* due_id
  699. { due_date = new Fl_Input(100, 485, 125, 25, _tr("Due"));
  700. due_date->labelsize(16);
  701. due_date->textfont(1);
  702. due_date->textsize(16);
  703. due_date->align((FL_ALIGN_TOP_LEFT));
  704. } // Fl_Input* due_date
  705. { btnShowCalendarDueDate = new Fl_Button(230, 485, 30, 25, _tr("@<->"));
  706. btnShowCalendarDueDate->tooltip(_tr("Show calendar"));
  707. btnShowCalendarDueDate->labelsize(18);
  708. btnShowCalendarDueDate->labelcolor(22);
  709. } // Fl_Button* btnShowCalendarDueDate
  710. { due_pct = new Fl_Float_Input_Fmt(270, 485, 80, 25, _tr("Pct. %"));
  711. due_pct->type(1);
  712. due_pct->box(FL_DOWN_BOX);
  713. due_pct->color(FL_BACKGROUND2_COLOR);
  714. due_pct->selection_color(FL_SELECTION_COLOR);
  715. due_pct->labeltype(FL_NORMAL_LABEL);
  716. due_pct->labelfont(1);
  717. due_pct->labelsize(16);
  718. due_pct->labelcolor(FL_FOREGROUND_COLOR);
  719. due_pct->textfont(1);
  720. due_pct->textsize(16);
  721. due_pct->align((FL_ALIGN_TOP_LEFT));
  722. due_pct->when(FL_WHEN_RELEASE);
  723. } // Fl_Float_Input_Fmt* due_pct
  724. { due_amount = new Fl_Float_Input_Fmt(355, 485, 120, 25, _tr("Amount"));
  725. due_amount->type(1);
  726. due_amount->box(FL_DOWN_BOX);
  727. due_amount->color(FL_BACKGROUND2_COLOR);
  728. due_amount->selection_color(FL_SELECTION_COLOR);
  729. due_amount->labeltype(FL_NORMAL_LABEL);
  730. due_amount->labelfont(1);
  731. due_amount->labelsize(16);
  732. due_amount->labelcolor(FL_FOREGROUND_COLOR);
  733. due_amount->textfont(1);
  734. due_amount->textsize(16);
  735. due_amount->align((FL_ALIGN_TOP_LEFT));
  736. due_amount->when(FL_WHEN_RELEASE);
  737. } // Fl_Float_Input_Fmt* due_amount
  738. { btnDueSave = new My_Fl_Return_Button(485, 485, 100, 25, _tr("Save"));
  739. btnDueSave->box(FL_UP_BOX);
  740. btnDueSave->color(FL_BACKGROUND_COLOR);
  741. btnDueSave->selection_color(FL_BACKGROUND_COLOR);
  742. btnDueSave->labeltype(FL_NORMAL_LABEL);
  743. btnDueSave->labelfont(0);
  744. btnDueSave->labelsize(16);
  745. btnDueSave->labelcolor(FL_FOREGROUND_COLOR);
  746. btnDueSave->align((FL_ALIGN_CENTER));
  747. btnDueSave->when(FL_WHEN_RELEASE);
  748. } // My_Fl_Return_Button* btnDueSave
  749. tabDues->end();
  750. } // Fl_Group* tabDues
  751. { tabPayments = new Fl_Group(10, 320, 585, 200, _tr("Payments"));
  752. tabPayments->labelfont(2);
  753. tabPayments->labelsize(16);
  754. tabPayments->hide();
  755. { grid_payments = new Fl_Data_Table(15, 330, 575, 130);
  756. grid_payments->box(FL_NO_BOX);
  757. grid_payments->color(FL_BACKGROUND2_COLOR);
  758. grid_payments->selection_color(FL_SELECTION_COLOR);
  759. grid_payments->labeltype(FL_NORMAL_LABEL);
  760. grid_payments->labelfont(0);
  761. grid_payments->labelsize(16);
  762. grid_payments->labelcolor(FL_FOREGROUND_COLOR);
  763. grid_payments->textsize(16);
  764. grid_payments->align((FL_ALIGN_BOTTOM));
  765. grid_payments->when(FL_WHEN_RELEASE_ALWAYS);
  766. } // Fl_Data_Table* grid_payments
  767. { local o = payment_id = new Fl_Output(15, 485, 80, 25, _tr("ID"));
  768. payment_id->labelsize(16);
  769. payment_id->textsize(16);
  770. payment_id->align((FL_ALIGN_TOP_LEFT));
  771. o->right_to_left(1);
  772. } // Fl_Output* payment_id
  773. { payment_date = new Fl_Input(100, 485, 125, 25, _tr("Date"));
  774. payment_date->labelsize(16);
  775. payment_date->textfont(1);
  776. payment_date->textsize(16);
  777. payment_date->align((FL_ALIGN_TOP_LEFT));
  778. } // Fl_Input* payment_date
  779. { btnShowCalendarPaymentDate = new Fl_Button(230, 485, 30, 25, _tr("@<->"));
  780. btnShowCalendarPaymentDate->tooltip(_tr("Show calendar"));
  781. btnShowCalendarPaymentDate->labelsize(18);
  782. btnShowCalendarPaymentDate->labelcolor(22);
  783. } // Fl_Button* btnShowCalendarPaymentDate
  784. { payemnt_amount = new Fl_Float_Input_Fmt(270, 485, 120, 25, _tr("Amount"));
  785. payemnt_amount->type(1);
  786. payemnt_amount->box(FL_DOWN_BOX);
  787. payemnt_amount->color(FL_BACKGROUND2_COLOR);
  788. payemnt_amount->selection_color(FL_SELECTION_COLOR);
  789. payemnt_amount->labeltype(FL_NORMAL_LABEL);
  790. payemnt_amount->labelfont(1);
  791. payemnt_amount->labelsize(16);
  792. payemnt_amount->labelcolor(FL_FOREGROUND_COLOR);
  793. payemnt_amount->textfont(1);
  794. payemnt_amount->textsize(16);
  795. payemnt_amount->align((FL_ALIGN_TOP_LEFT));
  796. payemnt_amount->when(FL_WHEN_RELEASE);
  797. } // Fl_Float_Input_Fmt* payemnt_amount
  798. { btnPaymentSave = new My_Fl_Return_Button(395, 485, 100, 25, _tr("Save"));
  799. btnPaymentSave->box(FL_UP_BOX);
  800. btnPaymentSave->color(FL_BACKGROUND_COLOR);
  801. btnPaymentSave->selection_color(FL_BACKGROUND_COLOR);
  802. btnPaymentSave->labeltype(FL_NORMAL_LABEL);
  803. btnPaymentSave->labelfont(0);
  804. btnPaymentSave->labelsize(16);
  805. btnPaymentSave->labelcolor(FL_FOREGROUND_COLOR);
  806. btnPaymentSave->align((FL_ALIGN_CENTER));
  807. btnPaymentSave->when(FL_WHEN_RELEASE);
  808. } // My_Fl_Return_Button* btnPaymentSave
  809. tabPayments->end();
  810. } // Fl_Group* tabPayments
  811. linesTab->end();
  812. } // Fl_Tabs* linesTab
  813. o->end();
  814. } // Fl_Group* o
  815. { btnNumberOrder = new My_Fl_Return_Button(230, 525, 82, 25, _tr("Number"));
  816. btnNumberOrder->box(FL_UP_BOX);
  817. btnNumberOrder->color(FL_BACKGROUND_COLOR);
  818. btnNumberOrder->selection_color(FL_BACKGROUND_COLOR);
  819. btnNumberOrder->labeltype(FL_NORMAL_LABEL);
  820. btnNumberOrder->labelfont(0);
  821. btnNumberOrder->labelsize(16);
  822. btnNumberOrder->labelcolor(FL_FOREGROUND_COLOR);
  823. btnNumberOrder->align((FL_ALIGN_CENTER));
  824. btnNumberOrder->when(FL_WHEN_RELEASE);
  825. } // My_Fl_Return_Button* btnNumberOrder
  826. { dbAction = new Fl_Button(10, 525, 119, 25);
  827. dbAction->resize(9, 525, 119, 25);
  828. dbAction->down_box(FL_BORDER_BOX);
  829. dbAction->labeltype(FL_NO_LABEL);
  830. dbAction->labelsize(16);
  831. dbAction->textsize(16);
  832. } // Fl_Choice* dbAction
  833. { btnDbAction = new My_Fl_Return_Button(138, 525, 82, 25, _tr("Action"));
  834. btnDbAction->resize(138, 525, 82, 25);
  835. btnDbAction->label(_tr("Action"));
  836. btnDbAction->tooltip(_tr("Perform the selected action on this order"));
  837. btnDbAction->box(FL_UP_BOX);
  838. btnDbAction->color(FL_BACKGROUND_COLOR);
  839. btnDbAction->selection_color(FL_BACKGROUND_COLOR);
  840. btnDbAction->labeltype(FL_NORMAL_LABEL);
  841. btnDbAction->labelfont(1);
  842. btnDbAction->labelsize(16);
  843. btnDbAction->labelcolor(FL_FOREGROUND_COLOR);
  844. btnDbAction->align((FL_ALIGN_CENTER));
  845. btnDbAction->when(FL_WHEN_RELEASE);
  846. } // My_Fl_Return_Button* btnDbAction
  847. tabMain->end();
  848. Fl_Group.current()->resizable(tabMain);
  849. } // Fl_Group* tabMain
  850. { tabDelivery = new Fl_Group(5, 95, 790, 460, _tr("Delivery"));
  851. tabDelivery->color(246);
  852. tabDelivery->labelfont(2);
  853. tabDelivery->labelsize(16);
  854. tabDelivery->hide();
  855. { db_orders_entity_address = new Fl_Input(91, 105, 694, 25, _tr("Address"));
  856. db_orders_entity_address->labelsize(16);
  857. db_orders_entity_address->textsize(16);
  858. add_input_field_to_map("orders", "entity_address", db_orders_entity_address);
  859. } // Fl_Input* db_orders_entity_address
  860. { db_orders_entity_zip = new Fl_Input(91, 135, 95, 25, _tr("ZIP"));
  861. db_orders_entity_zip->labelsize(16);
  862. db_orders_entity_zip->textsize(16);
  863. add_input_field_to_map("orders", "entity_zip", db_orders_entity_zip);
  864. } // Fl_Input* db_orders_entity_zip
  865. { db_orders_entity_city = new Fl_Input(288, 135, 497, 25, _tr("City"));
  866. db_orders_entity_city->labelsize(16);
  867. db_orders_entity_city->textsize(16);
  868. add_input_field_to_map("orders", "entity_city", db_orders_entity_city);
  869. } // Fl_Input* db_orders_entity_city
  870. { db_orders_entity_state = new Fl_Input(91, 165, 407, 25, _tr("State"));
  871. db_orders_entity_state->labelsize(16);
  872. db_orders_entity_state->textsize(16);
  873. add_input_field_to_map("orders", "entity_state", db_orders_entity_state);
  874. } // Fl_Input* db_orders_entity_state
  875. { db_orders_entity_country = new Fl_Input(585, 165, 201, 25, _tr("Country"));
  876. db_orders_entity_country->labelsize(16);
  877. db_orders_entity_country->textsize(16);
  878. add_input_field_to_map("orders", "entity_country", db_orders_entity_country);
  879. } // Fl_Input* db_orders_entity_country
  880. { db_orders_entity_phone = new Fl_Input(91, 195, 201, 25, _tr("Phone"));
  881. db_orders_entity_phone->labelsize(16);
  882. db_orders_entity_phone->textsize(16);
  883. add_input_field_to_map("orders", "entity_phone", db_orders_entity_phone);
  884. } // Fl_Input* db_orders_entity_phone
  885. { db_orders_entity_tax_number = new Fl_Input(585, 195, 200, 25, _tr("Tax Num."));
  886. db_orders_entity_tax_number->labelsize(16);
  887. db_orders_entity_tax_number->textsize(16);
  888. add_input_field_to_map("orders", "entity_tax_number", db_orders_entity_tax_number);
  889. } // Fl_Input* db_orders_entity_tax_number
  890. { db_orders_order_valid_till_date = new Fl_Input(90, 225, 121, 25, _tr("Valid till"));
  891. db_orders_order_valid_till_date->labelsize(16);
  892. db_orders_order_valid_till_date->textsize(16);
  893. add_input_field_to_map("orders", "order_valid_till_date", db_orders_order_valid_till_date);
  894. } // Fl_Input* db_orders_order_valid_till_date
  895. { btnShowCalendarValidTill = new Fl_Button(221, 225, 30, 25, _tr("@<->"));
  896. btnShowCalendarValidTill->tooltip(_tr("Show calendar"));
  897. btnShowCalendarValidTill->labelsize(18);
  898. btnShowCalendarValidTill->labelcolor(22);
  899. } // Fl_Button* btnShowCalendarValidTill
  900. { db_orders_entity_use_sales_tax2 = new Fl_Check_Button(585, 225, 155, 25, _tr("Use Sales Tax II"));
  901. db_orders_entity_use_sales_tax2->down_box(FL_DOWN_BOX);
  902. db_orders_entity_use_sales_tax2->labelsize(16);
  903. add_input_field_to_map("orders", "entity_use_sales_tax2", db_orders_entity_use_sales_tax2);
  904. } // Fl_Check_Button* db_orders_entity_use_sales_tax2
  905. { db_orders_entity_sales_tax_exempt = new Fl_Check_Button(585, 255, 155, 25, _tr("Sales Tax Exempt"));
  906. db_orders_entity_sales_tax_exempt->down_box(FL_DOWN_BOX);
  907. db_orders_entity_sales_tax_exempt->labelsize(16);
  908. add_input_field_to_map("orders", "entity_sales_tax_exempt", db_orders_entity_sales_tax_exempt);
  909. } // Fl_Check_Button* db_orders_entity_sales_tax_exempt
  910. { db_orders_notes = new Fl_Text_Editor_Buffered(15, 395, 770, 150, _tr("Notes"));
  911. db_orders_notes->box(FL_DOWN_FRAME);
  912. db_orders_notes->color(FL_BACKGROUND2_COLOR);
  913. db_orders_notes->selection_color(FL_SELECTION_COLOR);
  914. db_orders_notes->labeltype(FL_NORMAL_LABEL);
  915. db_orders_notes->labelfont(0);
  916. db_orders_notes->labelsize(16);
  917. db_orders_notes->labelcolor(FL_FOREGROUND_COLOR);
  918. db_orders_notes->textsize(16);
  919. db_orders_notes->align((FL_ALIGN_TOP_LEFT));
  920. db_orders_notes->when(FL_WHEN_RELEASE);
  921. Fl_Group.current()->resizable(db_orders_notes);
  922. add_input_field_to_map("orders", "notes", db_orders_notes);
  923. } // Fl_Text_Editor_Buffered* db_orders_notes
  924. { local o = new Fl_Check_Button(125, 375, 125, 25, _tr("Wrap lines"));
  925. o->down_box(FL_DOWN_BOX);
  926. o->value(1);
  927. o->labelsize(16);
  928. o->callback(cb_Wrap);
  929. } // Fl_Check_Button* o
  930. { db_orders_irpf_pct_retention = new Fl_Float_Input_Fmt(585, 285, 70, 25, _tr("I.R.P.F. %"));
  931. db_orders_irpf_pct_retention->type(1);
  932. db_orders_irpf_pct_retention->box(FL_DOWN_BOX);
  933. db_orders_irpf_pct_retention->color(FL_BACKGROUND2_COLOR);
  934. db_orders_irpf_pct_retention->selection_color(FL_SELECTION_COLOR);
  935. db_orders_irpf_pct_retention->labeltype(FL_NORMAL_LABEL);
  936. db_orders_irpf_pct_retention->labelfont(0);
  937. db_orders_irpf_pct_retention->labelsize(16);
  938. db_orders_irpf_pct_retention->labelcolor(FL_FOREGROUND_COLOR);
  939. db_orders_irpf_pct_retention->textsize(16);
  940. db_orders_irpf_pct_retention->align((FL_ALIGN_RIGHT));
  941. db_orders_irpf_pct_retention->when(FL_WHEN_RELEASE);
  942. add_input_field_to_map("orders", "irpf_pct_retention", db_orders_irpf_pct_retention);
  943. } // Fl_Float_Input_Fmt* db_orders_irpf_pct_retention
  944. tabDelivery->end();
  945. } // Fl_Group* tabDelivery
  946. { tabOptions = new Fl_Group(5, 95, 790, 460, _tr("Options"));
  947. tabOptions->color(246);
  948. tabOptions->labelfont(2);
  949. tabOptions->labelsize(16);
  950. tabOptions->hide();
  951. { opt_ask_for_printer = new Fl_Check_Button(20, 115, 155, 25, _tr("Ask for printer"));
  952. opt_ask_for_printer->down_box(FL_DOWN_BOX);
  953. opt_ask_for_printer->labelsize(16);
  954. } // Fl_Check_Button* opt_ask_for_printer
  955. { opt_print_only_data = new Fl_Check_Button(20, 150, 155, 25, _tr("Print only data"));
  956. opt_print_only_data->down_box(FL_DOWN_BOX);
  957. opt_print_only_data->labelsize(16);
  958. } // Fl_Check_Button* opt_print_only_data
  959. { opt_print_to_pdf = new Fl_Check_Button(20, 180, 155, 25, _tr("Print to PDF"));
  960. opt_print_to_pdf->down_box(FL_DOWN_BOX);
  961. opt_print_to_pdf->labelsize(16);
  962. } // Fl_Check_Button* opt_print_to_pdf
  963. { opt_print_page_format = new Fl_Choice_Str(20, 215, 130, 25);
  964. opt_print_page_format->box(FL_FLAT_BOX);
  965. opt_print_page_format->down_box(FL_BORDER_BOX);
  966. opt_print_page_format->color(FL_BACKGROUND_COLOR);
  967. opt_print_page_format->selection_color(FL_SELECTION_COLOR);
  968. opt_print_page_format->labeltype(FL_NO_LABEL);
  969. opt_print_page_format->labelfont(0);
  970. opt_print_page_format->labelsize(16);
  971. opt_print_page_format->labelcolor(FL_FOREGROUND_COLOR);
  972. opt_print_page_format->textsize(16);
  973. opt_print_page_format->align((FL_ALIGN_LEFT));
  974. opt_print_page_format->when(FL_WHEN_RELEASE);
  975. } // Fl_Choice_Str* opt_print_page_format
  976. { btnOptPrint = new Fl_Button(20, 250, 130, 25, _tr("Print"));
  977. btnOptPrint->tooltip(_tr("Print the current order"));
  978. btnOptPrint->labelsize(16);
  979. } // Fl_Button* btnOptPrint
  980. { opt_email_program = new Fl_Input(260, 145, 520, 25, _tr("Email program"));
  981. opt_email_program->tooltip(_tr("Type partal description to search on availlable entities"));
  982. opt_email_program->labelsize(16);
  983. opt_email_program->textsize(16);
  984. opt_email_program->align((FL_ALIGN_TOP_LEFT));
  985. } // Fl_Input* opt_email_program
  986. { opt_email_program_command = new Fl_Input(260, 210, 520, 25, _tr("Email program parameters"));
  987. opt_email_program_command->tooltip(_tr("Type partal description to search on availlable entities"));
  988. opt_email_program_command->labelsize(16);
  989. opt_email_program_command->textsize(16);
  990. opt_email_program_command->align((FL_ALIGN_TOP_LEFT));
  991. } // Fl_Input* opt_email_program_command
  992. { btnOptSendEmail = new Fl_Button(260, 250, 130, 25, _tr("Send as email"));
  993. btnOptSendEmail->tooltip(_tr("Print the current order"));
  994. btnOptSendEmail->labelsize(16);
  995. } // Fl_Button* btnOptSendEmail
  996. { opt_print_order_company_info = new Fl_Text_Editor_Buffered(20, 350, 375, 200, _tr("Company Info"));
  997. opt_print_order_company_info->box(FL_DOWN_FRAME);
  998. opt_print_order_company_info->color(FL_BACKGROUND2_COLOR);
  999. opt_print_order_company_info->selection_color(FL_SELECTION_COLOR);
  1000. opt_print_order_company_info->labeltype(FL_NORMAL_LABEL);
  1001. opt_print_order_company_info->labelfont(0);
  1002. opt_print_order_company_info->labelsize(16);
  1003. opt_print_order_company_info->labelcolor(FL_FOREGROUND_COLOR);
  1004. opt_print_order_company_info->textsize(16);
  1005. opt_print_order_company_info->align((FL_ALIGN_TOP_LEFT));
  1006. opt_print_order_company_info->when(FL_WHEN_RELEASE);
  1007. } // Fl_Text_Editor_Buffered* opt_print_order_company_info
  1008. { local o = new Fl_Check_Button(200, 330, 125, 25, _tr("Wrap lines"));
  1009. o->down_box(FL_DOWN_BOX);
  1010. o->value(1);
  1011. o->labelsize(16);
  1012. o->callback(cb_Wrap1);
  1013. } // Fl_Check_Button* o
  1014. { opt_print_order_bottom_info = new Fl_Text_Editor_Buffered(405, 350, 375, 200, _tr("Company Info"));
  1015. opt_print_order_bottom_info->box(FL_DOWN_FRAME);
  1016. opt_print_order_bottom_info->color(FL_BACKGROUND2_COLOR);
  1017. opt_print_order_bottom_info->selection_color(FL_SELECTION_COLOR);
  1018. opt_print_order_bottom_info->labeltype(FL_NORMAL_LABEL);
  1019. opt_print_order_bottom_info->labelfont(0);
  1020. opt_print_order_bottom_info->labelsize(16);
  1021. opt_print_order_bottom_info->labelcolor(FL_FOREGROUND_COLOR);
  1022. opt_print_order_bottom_info->textsize(16);
  1023. opt_print_order_bottom_info->align((FL_ALIGN_TOP_LEFT));
  1024. opt_print_order_bottom_info->when(FL_WHEN_RELEASE);
  1025. Fl_Group.current()->resizable(opt_print_order_bottom_info);
  1026. } // Fl_Text_Editor_Buffered* opt_print_order_bottom_info
  1027. { local o = new Fl_Check_Button(590, 330, 125, 25, _tr("Wrap lines"));
  1028. o->down_box(FL_DOWN_BOX);
  1029. o->value(1);
  1030. o->labelsize(16);
  1031. o->callback(cb_Wrap2);
  1032. } // Fl_Check_Button* o
  1033. tabOptions->end();
  1034. } // Fl_Group* tabOptions
  1035. { tabChartStatistics = new Fl_Group(5, 95, 790, 460, _tr("Statistics"));
  1036. tabChartStatistics->color(246);
  1037. tabChartStatistics->labelfont(2);
  1038. tabChartStatistics->labelsize(16);
  1039. tabChartStatistics->hide();
  1040. tabChartStatistics->end();
  1041. } // Fl_Group* tabChartStatistics
  1042. { tabHistory = new Fl_Group(5, 95, 790, 460, _tr("History"));
  1043. tabHistory->color(246);
  1044. tabHistory->labelfont(2);
  1045. tabHistory->labelsize(16);
  1046. tabHistory->hide();
  1047. tabHistory->end();
  1048. } // Fl_Group* tabHistory
  1049. { tabPrintPreview = new Fl_Group(5, 95, 790, 460, _tr("Preview"));
  1050. tabPrintPreview->color(246);
  1051. tabPrintPreview->labelfont(2);
  1052. tabPrintPreview->labelsize(16);
  1053. tabPrintPreview->hide();
  1054. tabPrintPreview->end();
  1055. } // Fl_Group* tabPrintPreview
  1056. { tabTotals = new Fl_Group(5, 95, 790, 460, _tr("Totals"));
  1057. tabTotals->color(246);
  1058. tabTotals->labelfont(2);
  1059. tabTotals->labelsize(16);
  1060. tabTotals->hide();
  1061. { totals_balance = new Fl_Float_Input_Fmt(145, 155, 110, 25, _tr("Balance"));
  1062. totals_balance->type(1);
  1063. totals_balance->box(FL_DOWN_BOX);
  1064. totals_balance->color(FL_BACKGROUND2_COLOR);
  1065. totals_balance->selection_color(FL_SELECTION_COLOR);
  1066. totals_balance->labeltype(FL_NORMAL_LABEL);
  1067. totals_balance->labelfont(0);
  1068. totals_balance->labelsize(16);
  1069. totals_balance->labelcolor(FL_FOREGROUND_COLOR);
  1070. totals_balance->textsize(16);
  1071. totals_balance->align((FL_ALIGN_LEFT));
  1072. totals_balance->when(FL_WHEN_RELEASE);
  1073. } // Fl_Float_Input_Fmt* totals_balance
  1074. { db_totals_overview_sales_quoted = new Fl_Float_Input_Fmt(145, 200, 110, 25, _tr("Sales Quoted"));
  1075. db_totals_overview_sales_quoted->type(1);
  1076. db_totals_overview_sales_quoted->box(FL_DOWN_BOX);
  1077. db_totals_overview_sales_quoted->color(FL_BACKGROUND2_COLOR);
  1078. db_totals_overview_sales_quoted->selection_color(FL_SELECTION_COLOR);
  1079. db_totals_overview_sales_quoted->labeltype(FL_NORMAL_LABEL);
  1080. db_totals_overview_sales_quoted->labelfont(0);
  1081. db_totals_overview_sales_quoted->labelsize(16);
  1082. db_totals_overview_sales_quoted->labelcolor(FL_FOREGROUND_COLOR);
  1083. db_totals_overview_sales_quoted->textsize(16);
  1084. db_totals_overview_sales_quoted->align((FL_ALIGN_LEFT));
  1085. db_totals_overview_sales_quoted->when(FL_WHEN_RELEASE);
  1086. add_input_field_to_map("totals_overview", "sales_quoted", db_totals_overview_sales_quoted);
  1087. } // Fl_Float_Input_Fmt* db_totals_overview_sales_quoted
  1088. { db_totals_overview_sales_ordered = new Fl_Float_Input_Fmt(145, 235, 110, 25, _tr("Sales Ordered"));
  1089. db_totals_overview_sales_ordered->type(1);
  1090. db_totals_overview_sales_ordered->box(FL_DOWN_BOX);
  1091. db_totals_overview_sales_ordered->color(FL_BACKGROUND2_COLOR);
  1092. db_totals_overview_sales_ordered->selection_color(FL_SELECTION_COLOR);
  1093. db_totals_overview_sales_ordered->labeltype(FL_NORMAL_LABEL);
  1094. db_totals_overview_sales_ordered->labelfont(0);
  1095. db_totals_overview_sales_ordered->labelsize(16);
  1096. db_totals_overview_sales_ordered->labelcolor(FL_FOREGROUND_COLOR);
  1097. db_totals_overview_sales_ordered->textsize(16);
  1098. db_totals_overview_sales_ordered->align((FL_ALIGN_LEFT));
  1099. db_totals_overview_sales_ordered->when(FL_WHEN_RELEASE);
  1100. add_input_field_to_map("totals_overview", "sales_ordered", db_totals_overview_sales_ordered);
  1101. } // Fl_Float_Input_Fmt* db_totals_overview_sales_ordered
  1102. { db_totals_overview_sales_delivered = new Fl_Float_Input_Fmt(145, 270, 110, 25, _tr("Sales Delivered"));
  1103. db_totals_overview_sales_delivered->type(1);
  1104. db_totals_overview_sales_delivered->box(FL_DOWN_BOX);
  1105. db_totals_overview_sales_delivered->color(FL_BACKGROUND2_COLOR);
  1106. db_totals_overview_sales_delivered->selection_color(FL_SELECTION_COLOR);
  1107. db_totals_overview_sales_delivered->labeltype(FL_NORMAL_LABEL);
  1108. db_totals_overview_sales_delivered->labelfont(0);
  1109. db_totals_overview_sales_delivered->labelsize(16);
  1110. db_totals_overview_sales_delivered->labelcolor(FL_FOREGROUND_COLOR);
  1111. db_totals_overview_sales_delivered->textsize(16);
  1112. db_totals_overview_sales_delivered->align((FL_ALIGN_LEFT));
  1113. db_totals_overview_sales_delivered->when(FL_WHEN_RELEASE);
  1114. add_input_field_to_map("totals_overview", "sales_delivered", db_totals_overview_sales_delivered);
  1115. } // Fl_Float_Input_Fmt* db_totals_overview_sales_delivered
  1116. { db_totals_overview_sales_invoiced = new Fl_Float_Input_Fmt(145, 305, 110, 25, _tr("Sales Invoiced"));
  1117. db_totals_overview_sales_invoiced->type(1);
  1118. db_totals_overview_sales_invoiced->box(FL_DOWN_BOX);
  1119. db_totals_overview_sales_invoiced->color(FL_BACKGROUND2_COLOR);
  1120. db_totals_overview_sales_invoiced->selection_color(FL_SELECTION_COLOR);
  1121. db_totals_overview_sales_invoiced->labeltype(FL_NORMAL_LABEL);
  1122. db_totals_overview_sales_invoiced->labelfont(0);
  1123. db_totals_overview_sales_invoiced->labelsize(16);
  1124. db_totals_overview_sales_invoiced->labelcolor(FL_FOREGROUND_COLOR);
  1125. db_totals_overview_sales_invoiced->textsize(16);
  1126. db_totals_overview_sales_invoiced->align((FL_ALIGN_LEFT));
  1127. db_totals_overview_sales_invoiced->when(FL_WHEN_RELEASE);
  1128. add_input_field_to_map("totals_overview", "sales_invoiced", db_totals_overview_sales_invoiced);
  1129. } // Fl_Float_Input_Fmt* db_totals_overview_sales_invoiced
  1130. { db_totals_overview_sales_discount = new Fl_Float_Input_Fmt(145, 340, 110, 25, _tr("Sales Discount"));
  1131. db_totals_overview_sales_discount->type(1);
  1132. db_totals_overview_sales_discount->box(FL_DOWN_BOX);
  1133. db_totals_overview_sales_discount->color(FL_BACKGROUND2_COLOR);
  1134. db_totals_overview_sales_discount->selection_color(FL_SELECTION_COLOR);
  1135. db_totals_overview_sales_discount->labeltype(FL_NORMAL_LABEL);
  1136. db_totals_overview_sales_discount->labelfont(0);
  1137. db_totals_overview_sales_discount->labelsize(16);
  1138. db_totals_overview_sales_discount->labelcolor(FL_FOREGROUND_COLOR);
  1139. db_totals_overview_sales_discount->textsize(16);
  1140. db_totals_overview_sales_discount->align((FL_ALIGN_LEFT));
  1141. db_totals_overview_sales_discount->when(FL_WHEN_RELEASE);
  1142. add_input_field_to_map("totals_overview", "sales_discount", db_totals_overview_sales_discount);
  1143. } // Fl_Float_Input_Fmt* db_totals_overview_sales_discount
  1144. { db_totals_overview_sales_tax1 = new Fl_Float_Input_Fmt(145, 375, 110, 25, _tr("Sales Tax1"));
  1145. db_totals_overview_sales_tax1->type(1);
  1146. db_totals_overview_sales_tax1->box(FL_DOWN_BOX);
  1147. db_totals_overview_sales_tax1->color(FL_BACKGROUND2_COLOR);
  1148. db_totals_overview_sales_tax1->selection_color(FL_SELECTION_COLOR);
  1149. db_totals_overview_sales_tax1->labeltype(FL_NORMAL_LABEL);
  1150. db_totals_overview_sales_tax1->labelfont(0);
  1151. db_totals_overview_sales_tax1->labelsize(16);
  1152. db_totals_overview_sales_tax1->labelcolor(FL_FOREGROUND_COLOR);
  1153. db_totals_overview_sales_tax1->textsize(16);
  1154. db_totals_overview_sales_tax1->align((FL_ALIGN_LEFT));
  1155. db_totals_overview_sales_tax1->when(FL_WHEN_RELEASE);
  1156. add_input_field_to_map("totals_overview", "sales_tax1", db_totals_overview_sales_tax1);
  1157. } // Fl_Float_Input_Fmt* db_totals_overview_sales_tax1
  1158. { db_totals_overview_sales_tax2 = new Fl_Float_Input_Fmt(145, 410, 110, 25, _tr("Sales Tax2"));
  1159. db_totals_overview_sales_tax2->type(1);
  1160. db_totals_overview_sales_tax2->box(FL_DOWN_BOX);
  1161. db_totals_overview_sales_tax2->color(FL_BACKGROUND2_COLOR);
  1162. db_totals_overview_sales_tax2->selection_color(FL_SELECTION_COLOR);
  1163. db_totals_overview_sales_tax2->labeltype(FL_NORMAL_LABEL);
  1164. db_totals_overview_sales_tax2->labelfont(0);
  1165. db_totals_overview_sales_tax2->labelsize(16);
  1166. db_totals_overview_sales_tax2->labelcolor(FL_FOREGROUND_COLOR);
  1167. db_totals_overview_sales_tax2->textsize(16);
  1168. db_totals_overview_sales_tax2->align((FL_ALIGN_LEFT));
  1169. db_totals_overview_sales_tax2->when(FL_WHEN_RELEASE);
  1170. add_input_field_to_map("totals_overview", "sales_tax2", db_totals_overview_sales_tax2);
  1171. } // Fl_Float_Input_Fmt* db_totals_overview_sales_tax2
  1172. { db_totals_overview_sales_paid = new Fl_Float_Input_Fmt(145, 445, 110, 25, _tr("Sales Paid"));
  1173. db_totals_overview_sales_paid->type(1);
  1174. db_totals_overview_sales_paid->box(FL_DOWN_BOX);
  1175. db_totals_overview_sales_paid->color(FL_BACKGROUND2_COLOR);
  1176. db_totals_overview_sales_paid->selection_color(FL_SELECTION_COLOR);
  1177. db_totals_overview_sales_paid->labeltype(FL_NORMAL_LABEL);
  1178. db_totals_overview_sales_paid->labelfont(0);
  1179. db_totals_overview_sales_paid->labelsize(16);
  1180. db_totals_overview_sales_paid->labelcolor(FL_FOREGROUND_COLOR);
  1181. db_totals_overview_sales_paid->textsize(16);
  1182. db_totals_overview_sales_paid->align((FL_ALIGN_LEFT));
  1183. db_totals_overview_sales_paid->when(FL_WHEN_RELEASE);
  1184. add_input_field_to_map("totals_overview", "sales_paid", db_totals_overview_sales_paid);
  1185. } // Fl_Float_Input_Fmt* db_totals_overview_sales_paid
  1186. { btnRefreshTotals = new My_Fl_Return_Button(415, 155, 110, 25, _tr("Refresh"));
  1187. btnRefreshTotals->box(FL_UP_BOX);
  1188. btnRefreshTotals->color(FL_BACKGROUND_COLOR);
  1189. btnRefreshTotals->selection_color(FL_BACKGROUND_COLOR);
  1190. btnRefreshTotals->labeltype(FL_NORMAL_LABEL);
  1191. btnRefreshTotals->labelfont(0);
  1192. btnRefreshTotals->labelsize(16);
  1193. btnRefreshTotals->labelcolor(FL_FOREGROUND_COLOR);
  1194. btnRefreshTotals->align((FL_ALIGN_CENTER));
  1195. btnRefreshTotals->when(FL_WHEN_RELEASE);
  1196. } // My_Fl_Return_Button* btnRefreshTotals
  1197. { db_totals_overview_buys_quoted = new Fl_Float_Input_Fmt(415, 200, 110, 25, _tr("Buys Quoted"));
  1198. db_totals_overview_buys_quoted->type(1);
  1199. db_totals_overview_buys_quoted->box(FL_DOWN_BOX);
  1200. db_totals_overview_buys_quoted->color(FL_BACKGROUND2_COLOR);
  1201. db_totals_overview_buys_quoted->selection_color(FL_SELECTION_COLOR);
  1202. db_totals_overview_buys_quoted->labeltype(FL_NORMAL_LABEL);
  1203. db_totals_overview_buys_quoted->labelfont(0);
  1204. db_totals_overview_buys_quoted->labelsize(16);
  1205. db_totals_overview_buys_quoted->labelcolor(FL_FOREGROUND_COLOR);
  1206. db_totals_overview_buys_quoted->textsize(16);
  1207. db_totals_overview_buys_quoted->align((FL_ALIGN_LEFT));
  1208. db_totals_overview_buys_quoted->when(FL_WHEN_RELEASE);
  1209. add_input_field_to_map("totals_overview", "buys_quoted", db_totals_overview_buys_quoted);
  1210. } // Fl_Float_Input_Fmt* db_totals_overview_buys_quoted
  1211. { db_totals_overview_buys_ordered = new Fl_Float_Input_Fmt(415, 235, 110, 25, _tr("Buys Ordered"));
  1212. db_totals_overview_buys_ordered->type(1);
  1213. db_totals_overview_buys_ordered->box(FL_DOWN_BOX);
  1214. db_totals_overview_buys_ordered->color(FL_BACKGROUND2_COLOR);
  1215. db_totals_overview_buys_ordered->selection_color(FL_SELECTION_COLOR);
  1216. db_totals_overview_buys_ordered->labeltype(FL_NORMAL_LABEL);
  1217. db_totals_overview_buys_ordered->labelfont(0);
  1218. db_totals_overview_buys_ordered->labelsize(16);
  1219. db_totals_overview_buys_ordered->labelcolor(FL_FOREGROUND_COLOR);
  1220. db_totals_overview_buys_ordered->textsize(16);
  1221. db_totals_overview_buys_ordered->align((FL_ALIGN_LEFT));
  1222. db_totals_overview_buys_ordered->when(FL_WHEN_RELEASE);
  1223. add_input_field_to_map("totals_overview", "buys_ordered", db_totals_overview_buys_ordered);
  1224. } // Fl_Float_Input_Fmt* db_totals_overview_buys_ordered
  1225. { db_totals_overview_buys_received = new Fl_Float_Input_Fmt(415, 270, 110, 25, _tr("Buys Received"));
  1226. db_totals_overview_buys_received->type(1);
  1227. db_totals_overview_buys_received->box(FL_DOWN_BOX);
  1228. db_totals_overview_buys_received->color(FL_BACKGROUND2_COLOR);
  1229. db_totals_overview_buys_received->selection_color(FL_SELECTION_COLOR);
  1230. db_totals_overview_buys_received->labeltype(FL_NORMAL_LABEL);
  1231. db_totals_overview_buys_received->labelfont(0);
  1232. db_totals_overview_buys_received->labelsize(16);
  1233. db_totals_overview_buys_received->labelcolor(FL_FOREGROUND_COLOR);
  1234. db_totals_overview_buys_received->textsize(16);
  1235. db_totals_overview_buys_received->align((FL_ALIGN_LEFT));
  1236. db_totals_overview_buys_received->when(FL_WHEN_RELEASE);
  1237. add_input_field_to_map("totals_overview", "buys_received", db_totals_overview_buys_received);
  1238. } // Fl_Float_Input_Fmt* db_totals_overview_buys_received
  1239. { db_totals_overview_buys_invoiced = new Fl_Float_Input_Fmt(415, 305, 110, 25, _tr("Buys Invoiced"));
  1240. db_totals_overview_buys_invoiced->type(1);
  1241. db_totals_overview_buys_invoiced->box(FL_DOWN_BOX);
  1242. db_totals_overview_buys_invoiced->color(FL_BACKGROUND2_COLOR);
  1243. db_totals_overview_buys_invoiced->selection_color(FL_SELECTION_COLOR);
  1244. db_totals_overview_buys_invoiced->labeltype(FL_NORMAL_LABEL);
  1245. db_totals_overview_buys_invoiced->labelfont(0);
  1246. db_totals_overview_buys_invoiced->labelsize(16);
  1247. db_totals_overview_buys_invoiced->labelcolor(FL_FOREGROUND_COLOR);
  1248. db_totals_overview_buys_invoiced->textsize(16);
  1249. db_totals_overview_buys_invoiced->align((FL_ALIGN_LEFT));
  1250. db_totals_overview_buys_invoiced->when(FL_WHEN_RELEASE);
  1251. add_input_field_to_map("totals_overview", "buys_invoiced", db_totals_overview_buys_invoiced);
  1252. } // Fl_Float_Input_Fmt* db_totals_overview_buys_invoiced
  1253. { db_totals_overview_buys_discount = new Fl_Float_Input_Fmt(415, 340, 110, 25, _tr("Buys Discount"));
  1254. db_totals_overview_buys_discount->type(1);
  1255. db_totals_overview_buys_discount->box(FL_DOWN_BOX);
  1256. db_totals_overview_buys_discount->color(FL_BACKGROUND2_COLOR);
  1257. db_totals_overview_buys_discount->selection_color(FL_SELECTION_COLOR);
  1258. db_totals_overview_buys_discount->labeltype(FL_NORMAL_LABEL);
  1259. db_totals_overview_buys_discount->labelfont(0);
  1260. db_totals_overview_buys_discount->labelsize(16);
  1261. db_totals_overview_buys_discount->labelcolor(FL_FOREGROUND_COLOR);
  1262. db_totals_overview_buys_discount->textsize(16);
  1263. db_totals_overview_buys_discount->align((FL_ALIGN_LEFT));
  1264. db_totals_overview_buys_discount->when(FL_WHEN_RELEASE);
  1265. add_input_field_to_map("totals_overview", "buys_discount", db_totals_overview_buys_discount);
  1266. } // Fl_Float_Input_Fmt* db_totals_overview_buys_discount
  1267. { db_totals_overview_buys_tax1 = new Fl_Float_Input_Fmt(415, 375, 110, 25, _tr("Buys Tax1"));
  1268. db_totals_overview_buys_tax1->type(1);
  1269. db_totals_overview_buys_tax1->box(FL_DOWN_BOX);
  1270. db_totals_overview_buys_tax1->color(FL_BACKGROUND2_COLOR);
  1271. db_totals_overview_buys_tax1->selection_color(FL_SELECTION_COLOR);
  1272. db_totals_overview_buys_tax1->labeltype(FL_NORMAL_LABEL);
  1273. db_totals_overview_buys_tax1->labelfont(0);
  1274. db_totals_overview_buys_tax1->labelsize(16);
  1275. db_totals_overview_buys_tax1->labelcolor(FL_FOREGROUND_COLOR);
  1276. db_totals_overview_buys_tax1->textsize(16);
  1277. db_totals_overview_buys_tax1->align((FL_ALIGN_LEFT));
  1278. db_totals_overview_buys_tax1->when(FL_WHEN_RELEASE);
  1279. add_input_field_to_map("totals_overview", "buys_tax1", db_totals_overview_buys_tax1);
  1280. } // Fl_Float_Input_Fmt* db_totals_overview_buys_tax1
  1281. { db_totals_overview_buys_tax2 = new Fl_Float_Input_Fmt(415, 410, 110, 25, _tr("Buys Tax2"));
  1282. db_totals_overview_buys_tax2->type(1);
  1283. db_totals_overview_buys_tax2->box(FL_DOWN_BOX);
  1284. db_totals_overview_buys_tax2->color(FL_BACKGROUND2_COLOR);
  1285. db_totals_overview_buys_tax2->selection_color(FL_SELECTION_COLOR);
  1286. db_totals_overview_buys_tax2->labeltype(FL_NORMAL_LABEL);
  1287. db_totals_overview_buys_tax2->labelfont(0);
  1288. db_totals_overview_buys_tax2->labelsize(16);
  1289. db_totals_overview_buys_tax2->labelcolor(FL_FOREGROUND_COLOR);
  1290. db_totals_overview_buys_tax2->textsize(16);
  1291. db_totals_overview_buys_tax2->align((FL_ALIGN_LEFT));
  1292. db_totals_overview_buys_tax2->when(FL_WHEN_RELEASE);
  1293. add_input_field_to_map("totals_overview", "buys_tax2", db_totals_overview_buys_tax2);
  1294. } // Fl_Float_Input_Fmt* db_totals_overview_buys_tax2
  1295. { db_totals_overview_buys_paid = new Fl_Float_Input_Fmt(415, 445, 110, 25, _tr("Buys Paid"));
  1296. db_totals_overview_buys_paid->type(1);
  1297. db_totals_overview_buys_paid->box(FL_DOWN_BOX);
  1298. db_totals_overview_buys_paid->color(FL_BACKGROUND2_COLOR);
  1299. db_totals_overview_buys_paid->selection_color(FL_SELECTION_COLOR);
  1300. db_totals_overview_buys_paid->labeltype(FL_NORMAL_LABEL);
  1301. db_totals_overview_buys_paid->labelfont(0);
  1302. db_totals_overview_buys_paid->labelsize(16);
  1303. db_totals_overview_buys_paid->labelcolor(FL_FOREGROUND_COLOR);
  1304. db_totals_overview_buys_paid->textsize(16);
  1305. db_totals_overview_buys_paid->align((FL_ALIGN_LEFT));
  1306. db_totals_overview_buys_paid->when(FL_WHEN_RELEASE);
  1307. add_input_field_to_map("totals_overview", "buys_paid", db_totals_overview_buys_paid);
  1308. } // Fl_Float_Input_Fmt* db_totals_overview_buys_paid
  1309. tabTotals->end();
  1310. } // Fl_Group* tabTotals
  1311. tabs->end();
  1312. Fl_Group.current()->resizable(tabs);
  1313. } // Fl_Tabs* tabs
  1314. db_orders_order_type_id->textfont(db_orders_order_type_id->labelfont());
  1315. db_orders_order_type_id->textsize(db_orders_order_type_id->labelsize());
  1316. end();
  1317. }
  1318. function cb_Wrap(){}
  1319. function cb_Wrap1(){}
  1320. function cb_Wrap2(){}
  1321. }
  1322. //local win = new MainWindow(10, 50, 330, 320, "OURBIZ");
  1323. local win = new BaseReportA4();
  1324. win->resizable(win);
  1325. win->show_main();
  1326. math.number_format_set_dec_point(",");
  1327. math.number_format_set_thousand_sep(".");
  1328. Fl_Input.default_number_format("\0x02,.");
  1329. //Fl:scheme("plastic");
  1330. Fl.scheme("gtk+");
  1331. //use partial match to find verdana font
  1332. Fl.visual(FL_RGB);
  1333. //allow arrow keys navigation
  1334. Fl.option(Fl.OPTION_ARROW_FOCUS, true);
  1335. Fl.run();