This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
Bundler.require | |
# This is a demo program for the receipt-bank.com rest api. | |
class ReceiptBank | |
def initialize(u, p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Name: ProCon Invoice Mapping | |
Author: Chris Mills | |
Details: Mapping implemented as an XSL as single SAP Invoice message needs to be split to mutliple ProCon messages, 1 per PO | |
and financials calculated by unique PO. i.e. if invoice has 3 line items which relate to two PO's then need to split to | |
two output messages and calculate the tax and net amounts by PO, recursion much easier in XSL | |
NOTE: This will only send items from the invoice that relate to a contract, the business rules are meant to be no multi-contract | |
invoices and no mix of 1 item against a contract and another not but if it happens ProCon will only see parts of the invoice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use jQuery to html encode a value | |
*/ | |
function htmlEncode(value){ | |
//create a in-memory div, set its inner text(which jQuery automatically encodes) | |
//then grab the encoded contents back out. The div never exists on the page. | |
return $('<div/>').text(value).html(); | |
} | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Format a XML string - pretty printer (with line feeds) | |
*/ | |
function formatXml(xml) { | |
var formatted = ''; | |
var reg = /(>)(<)(\/*)/g; | |
xml = xml.replace(reg, '$1\r\n$2$3'); | |
var pad = 0; | |
jQuery.each(xml.split('\r\n'), function(index, node) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* function to pad a number with leading zeroes */ | |
function pad(num, size) { | |
var s = num+""; | |
while (s.length < size) s = "0" + s; | |
return s; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#all_text span | |
{ | |
text-decoration:underline; | |
background-color:yellow; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
method get_non_ded_tax_po_item. | |
data: tax_code type mwskz, | |
company_code type bukrs, | |
currency type waers, | |
tax_jurisdiction type txjcd, | |
gross_amount type wrbtr. | |
select single bukrs waers into (company_code, currency) | |
from ekko |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package au.com.inpex.mapping.lib; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.transform.OutputKeys; | |
import javax.xml.transform.Transformer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Use the HANA Node.js client library to execute a HANA SQL command. | |
See http://scn.sap.com/docs/DOC-48721?utm_campaign=CRM-XM13-SOC-TW_SCNL & | |
https://github.com/sap/node-hdb for details. | |
Example usage: | |
C:\MyScratchFolder\nodejs>node hana_sql_server.js <username> <password> <schema> "select * from t_persons" | |
Parameters: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ======================= | |
// service interfaces | |
trait OnOffDevice { | |
def on: Unit | |
def off: Unit | |
} | |
trait SensorDevice { | |
def isCoffeePresent: Boolean | |
} |
OlderNewer