7 <script type=
"text/javascript">
11 getShowWaitFunctions();
20 function InitInvoiceView() {
21 $.homecuValidator.setup({formValidate:
"invoiceForm", formStatusField:
"invoiceFormStatus"});
22 var bottomGrid = $(
"#bottomGrid").kendoGrid({
26 url:
"index.prg?operation=cuView&cu=<?php echo $SYSENV["BILL
"]["cu
"]; ?>",
30 parameterMap:
function(data, type) {
39 templateId: {type:
"number"},
40 textDescription: {type:
"string"},
41 statusLabel: {type:
"string"},
42 billHalf: {type:
"boolean"},
43 initialCosts: {type:
"string"},
44 recurringCosts: {type:
"string"}
47 parse:
function (data) {
49 if (data.status !==
"000") {
50 $.homecuValidator.displayMessage(data.error, $.homecuValidator.settings.statusError );
58 group: {field:
"billingStatusGroup"}
62 {field:
"billingStatusGroup", hidden:
true,
63 groupHeaderTemplate:
"# if (value == 0) { # Active: # } else if (value == 1) { # Pending: # } else { # Completed: # } #"}
65 rowTemplate: kendo.template($(
"#rowTemplate").html()),
66 altRowTemplate: kendo.template($(
"#altRowTemplate").html()),
67 dataBound:
function (e) {
68 $(
"#bottomGrid .k-grid-header").
remove();
70 $(
"#bottomGrid .k-grouping-row").each(
function () {
71 $(
this).after($(
"#headerRowTemplate").html());
72 $(
this).prev().find(
"td").css({borderBottom:
"1px solid black"});
73 $(
this).next().find(
"td").css({borderTop:
"1px solid black"});
76 $(
"#bottomGrid .k-grouping-row td").each(
function () {
77 $(
this).text($(
this).text());
91 function InitTop(topData) {
92 var topGrid = $(
"#topGrid").kendoGrid({
100 cuName: {type:
"string"},
101 type: {type:
"string"},
102 closed: {type:
"boolean"}
107 rowTemplate: kendo.template($(
"#topRowTemplate").html()),
108 dataBound:
function (e) {
109 $(
"#topGrid .k-grid-header").
remove();
110 $(
"#topGrid colgroup").
remove();
112 }).data(
"kendoGrid");
115 $(document).ready(
function () {
120 <script
id=
"topRowTemplate" type=
"text/k-kendo-template">
127 <tr data-uid=
"#: uid #">
131 <td>#
if (closed) { # Yes # }
else { # No # } #</td>
134 <script
id=
"headerRowTemplate" type=
"text/k-kendo-template">
137 <div
class=
"grid_12">
138 <div
class=
"grid_4 alpha">Item Name</div>
139 <div
class=
"grid_1">Split</div>
140 <div
class=
"grid_2">Status</div>
141 <div
class=
"grid_2">
Initial</div>
142 <div
class=
"grid_3 omega">Recurring</div>
147 <script
id=
"rowTemplate" type=
"text/x-kendo-template">
148 <tr
class=
"normalRow" data-uid=
"#= uid #">
150 <div
class=
"grid_12">
151 <div
class=
"grid_4 alpha">#
if (salesItemDescr ==
"") { # # }
else { # #: salesItemDescr # # } #</div>
152 <div
class=
"grid_1">#
if (billHalf) { # Yes # }
else { # No # } #</div>
153 <div
class=
"grid_2">#
if (statusLabel ==
"") { # # }
else { # #: statusLabel # # } #</div>
154 <div
class=
"grid_2">#
if (initialCosts ==
"") { # # }
else { # #: initialCosts # # } #</div>
155 <div
class=
"grid_3 omega">#
if (recurringCosts ==
"") { # # }
else { # #: recurringCosts # # } #</div>
157 <div
class=
"grid_12" style=
"margin: 15px;"><span
class=
"descriptionSpan"><b>Description: </b> #: textDescription #</span></div>
161 <script
id=
"altRowTemplate" type=
"text/x-kendo-template">
162 <tr
class=
"k-alt normalRow" data-uid=
"#= uid #">
164 <div
class=
"grid_12">
165 <div
class=
"grid_4 alpha">#
if (salesItemDescr ==
"") { # # }
else { # #: salesItemDescr # # } #</div>
166 <div
class=
"grid_1">#
if (billHalf) { # Yes # }
else { # No # } #</div>
167 <div
class=
"grid_2">#
if (statusLabel ==
"") { # # }
else { # #: statusLabel # # } #</div>
168 <div
class=
"grid_2">#
if (initialCosts ==
"") { # # }
else { # #: initialCosts # # } #</div>
169 <div
class=
"grid_3 omega">#
if (recurringCosts ==
"") { # # }
else { # #: recurringCosts # # } #</div>
171 <div
class=
"grid_12" style=
"margin: 15px;"><span
class=
"descriptionSpan"><b>Description: </b> #: textDescription #</span></div>
175 <div
class=
"container_12" id=
"invoiceForm">
176 <div
id=
"invoiceFormStatus"></div>
177 <div
class=
"grid_12">
178 <div
id=
"topGrid" class=
"cuIndexGrid"></div>
180 <div
class=
"grid_12">
184 <div
class=
"grid_12">
185 <div
id=
"bottomGrid" class=
"cuIndexGrid"></div>