v_config.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. //application details
  3. $apps[$x]['name'] = 'invoice';
  4. $apps[$x]['uuid'] = 'E5A1F4F5-7766-EC9C-118B-50F76B0788C0';
  5. $apps[$x]['category'] = '';
  6. $apps[$x]['subcategory'] = '';
  7. $apps[$x]['version'] = '';
  8. $apps[$x]['license'] = 'Mozilla Public License 1.1';
  9. $apps[$x]['url'] = 'http://www.fusionpbx.com';
  10. $apps[$x]['description']['en'] = '';
  11. //menu details
  12. $apps[$x]['menu'][$y]['title']['en'] = 'Invoices';
  13. $apps[$x]['menu'][$y]['uuid'] = '6EBE753B-0F83-DC34-1C0B-51DF2C6F0C3B';
  14. $apps[$x]['menu'][$y]['parent_uuid'] = 'FD29E39C-C936-F5FC-8E2B-611681B266B5';
  15. $apps[$x]['menu'][$y]['category'] = 'internal';
  16. $apps[$x]['menu'][$y]['path'] = '/mod/invoices/v_invoices.php';
  17. //$apps[$x]['menu'][$y]['groups'][] = 'user';
  18. //$apps[$x]['menu'][$y]['groups'][] = 'admin';
  19. $apps[$x]['menu'][$y]['groups'][] = 'superadmin';
  20. //permission details
  21. $apps[$x]['permissions'][$y]['name'] = 'invoice_view';
  22. $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
  23. //$apps[$x]['permissions'][$y]['groups'][] = 'user';
  24. //$apps[$x]['permissions'][$y]['groups'][] = 'admin';
  25. $apps[$x]['permissions'][1]['name'] = 'invoice_add';
  26. $apps[$x]['permissions'][1]['groups'][] = 'superadmin';
  27. //$apps[$x]['permissions'][1]['groups'][] = 'admin';
  28. $apps[$x]['permissions'][2]['name'] = 'invoice_edit';
  29. $apps[$x]['permissions'][2]['groups'][] = 'superadmin';
  30. //$apps[$x]['permissions'][2]['groups'][] = 'admin';
  31. //$apps[$x]['permissions'][2]['groups'][] = 'user';
  32. $apps[$x]['permissions'][$y]['name'] = 'invoice_item_view';
  33. $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
  34. //$apps[$x]['permissions'][$y]['groups'][] = 'user';
  35. //$apps[$x]['permissions'][$y]['groups'][] = 'admin';
  36. $apps[$x]['permissions'][1]['name'] = 'invoice_item_add';
  37. $apps[$x]['permissions'][1]['groups'][] = 'superadmin';
  38. //$apps[$x]['permissions'][1]['groups'][] = 'admin';
  39. $apps[$x]['permissions'][2]['name'] = 'invoice_item_edit';
  40. $apps[$x]['permissions'][2]['groups'][] = 'superadmin';
  41. //$apps[$x]['permissions'][2]['groups'][] = 'admin';
  42. //$apps[$x]['permissions'][2]['groups'][] = 'user';
  43. $apps[$x]['permissions'][3]['name'] = 'invoice_item_delete';
  44. $apps[$x]['permissions'][3]['groups'][] = 'superadmin';
  45. //$apps[$x]['permissions'][3]['groups'][] = 'admin';
  46. $apps[$x]['permissions'][3]['name'] = 'invoice_delete';
  47. $apps[$x]['permissions'][3]['groups'][] = 'superadmin';
  48. //$apps[$x]['permissions'][3]['groups'][] = 'admin';
  49. //schema details
  50. $y = 0; //table array index
  51. $z = 0; //field array index
  52. $apps[$x]['db'][$y]['table'] = 'v_invoices';
  53. $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'id';
  54. $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'invoice_id';
  55. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'serial';
  56. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'integer';
  57. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'INT NOT NULL AUTO_INCREMENT';
  58. $z++;
  59. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'invoice_uuid';
  60. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
  61. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
  62. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
  63. $apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary';
  64. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  65. $z++;
  66. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
  67. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
  68. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
  69. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
  70. $apps[$x]['db'][$y]['fields'][$z]['key'] = 'foreign';
  71. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  72. $z++;
  73. $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'domain_id ';
  74. $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'v_id';
  75. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
  76. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  77. $z++;
  78. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'contact_uuid_from';
  79. $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'contact_id_from';
  80. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
  81. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Contact ID invoice is sent from';
  82. $z++;
  83. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'contact_uuid_to';
  84. $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'contact_id_to';
  85. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
  86. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Contact ID invoice is sent to';
  87. $z++;
  88. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'invoice_number';
  89. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
  90. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Enter the invoice number.';
  91. $z++;
  92. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'invoice_date';
  93. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamp with time zone';
  94. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'datetime';
  95. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'timestamp';
  96. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Enter the date.';
  97. $z++;
  98. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'invoice_notes';
  99. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
  100. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Enter the invoice notes.';
  101. $z++;
  102. $y = 1; //table array index
  103. $apps[$x]['db'][$y]['table'] = 'v_invoice_items';
  104. $apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'id';
  105. $apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'invoice_item_id';
  106. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'serial';
  107. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'integer';
  108. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'INT NOT NULL AUTO_INCREMENT';
  109. $z++;
  110. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'invoice_item_uuid';
  111. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
  112. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
  113. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
  114. $apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary';
  115. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  116. $z++;
  117. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
  118. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
  119. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
  120. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
  121. $apps[$x]['db'][$y]['fields'][$z]['key'] = 'foreign';
  122. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  123. $z++;
  124. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'v_id';
  125. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
  126. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  127. $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
  128. $z++;
  129. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'invoice_id';
  130. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
  131. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  132. $apps[$x]['db'][$y]['fields'][$z]['deprecated'] = 'true';
  133. $z++;
  134. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'invoice_uuid';
  135. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
  136. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
  137. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
  138. $apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary';
  139. $apps[$x]['db'][$y]['fields'][$z]['description'] = '';
  140. $z++;
  141. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'item_qty';
  142. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
  143. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Enter the Quantity';
  144. $z++;
  145. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'item_desc';
  146. $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
  147. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Enter the description.';
  148. $z++;
  149. $apps[$x]['db'][$y]['fields'][$z]['name'] = 'item_unit_price';
  150. $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'numeric';
  151. $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'numeric';
  152. $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'decimal(10,2)';
  153. $apps[$x]['db'][$y]['fields'][$z]['description'] = 'Enter the unit price.';
  154. $z++;
  155. ?>