Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @HttpPost
- global static ID createInvoice (
- String customerId,
- String addressId,
- String invoiceId,
- String invoiceType,
- String invoiceTypeLocalized,
- String invoiceDate,
- String paymentDueDate,
- String invoiceNumber,
- String startDate,
- String endDate,
- String periodDescription,
- Decimal amount,
- Decimal vatAmount,
- Decimal totalAmount
- ) {
- invoice__c thisinvoice = new invoice__c (
- customerId__c = customerId,
- addressId__c = addressId,
- invoiceId__c = invoiceId,
- invoiceType__c = invoiceType,
- invoiceTypeLocalized__c = invoiceTypeLocalized,
- invoiceDate__c = Date.valueOf(invoiceDate.replace('T',' ')),
- paymentDueDate__c = Date.valueOf(paymentDueDate.replace('T',' ')),
- invoiceNumber__c = invoiceNumber,
- startDate__c = Date.valueOf(startDate.replace('T',' ')),
- endDate__c = Date.valueOf(endDate.replace('T',' ')),
- periodDescription__c = periodDescription,
- amount__c = amount,
- vatAmount__c = vatAmount,
- totalAmount__c = totalAmount
- );
- insert thisInvoice;
- return thisInvoice.Id;
- }
Add Comment
Please, Sign In to add comment