var Q1Client = { RESOURCES_URL : "http://localhost:8080/Q1Customer/resources", DISCOUNTS_URL : "http://localhost:8080/Q1Customer/resources/discountCodes", printHTML : function () { var htmlOut = "";// '
| CustID | dis-code | name | address | '; html += 'city | state | zip | phone | fax | ' + cust.getCustomerId() + ' | '; html += '' + String.fromCharCode(dcode.getDiscountCode()) + ' | '; html += '' + cust.getName() + ' | '; html += '' + cust.getAddressline1() + " " + cust.getAddressline2() + ' | ';
html += '' + cust.getCity() + ' | '; html += '' + cust.getState() + ' | '; html += '' + cust.getZip() + ' | '; html += '' + cust.getPhone() + ' | '; html += '' + cust.getFax() + ' | '; html += '' + cust.getEmail() + ' | '; html += ''; } } else { html += '
|---|---|---|---|---|---|---|---|---|---|
| No items detected | |||||||||
| Dis-code | Rate | Customer IDs | "; for (var i = 0; i < allCodeArr.length; i++) { var oneCode = new DiscountCode(allCodeArr[i].getUri()); html += '
|---|---|
| ' + String.fromCharCode(oneCode.getDiscountCode()) + ' | '; html += '' + oneCode.getRate() + ' | '; var custArr = (new Customers(oneCode.getCustomers().getUri())).getItems(); var csvCust = ""; // Comma separated customer IDs for (var j=0; j