private CustomFieldRef[] getPaymentFields(PaymentDTO payment, SalesOrder netSuiteOrder, NetSuiteApi api) { var fields = new List<CustomFieldRef> { new StringCustomFieldRef {scriptId = "custbody_mp_orden_venta_relacionada", value = netSuiteOrder.internalId}, new StringCustomFieldRef {scriptId = "custbody_mp_modo_pago", value = this.getPaymentMethod(payment.Method, api)}, new StringCustomFieldRef {scriptId = "custbody_mp_metodo_pago", value = this.getPaymentMethodForTheOTHERList(payment.Method)}, new StringCustomFieldRef {scriptId = "custbody_mp_numero_cuenta", value = "No Identificado"} }; if (payment.HasIntegration) { fields.Add(new StringCustomFieldRef { scriptId = "custbody_refpago", value = payment.Integration.IntegrationId }); } return fields.ToArray(); }
public Record GetPaymentFor(SalesOrder netSuiteOrder, PaymentDTO payment, string paymentId, NetSuiteApi api) { return new CustomerDeposit { salesOrder = new RecordRef { internalId= netSuiteOrder.internalId }, @class = new RecordRef { internalId = this.getBusinessUnit(api) }, payment = payment.Amount, paymentSpecified = true, customer = netSuiteOrder.entity, currency = new RecordRef { internalId = getCountry(api).Currency }, tranDate = payment.Date, memo = payment.Notes, externalId = paymentId, department = new RecordRef { internalId = "18" }, // no aplica customFieldList = new CustomFieldRef[] { new StringCustomFieldRef { scriptId = "custbody_refpago", value = payment.Integration.IntegrationId }, new StringCustomFieldRef {scriptId = "custbody_mp_numero_cuenta", value = "No Identificado"}, new StringCustomFieldRef {scriptId = "custbody_l54_letra", value = "6"}, // X new StringCustomFieldRef {scriptId = "custbody_l54_boca", value = "1"}, // 0001 } }; }
public Record GetPaymentFor(SalesOrder netSuiteOrder, PaymentDTO payment, string paymentId, NetSuiteApi api) { return new CustomerPayment { payment = payment.Amount, paymentSpecified = true, customer = netSuiteOrder.entity, currency = new RecordRef { internalId = "1" }, exchangeRate = 1, exchangeRateSpecified = true, tranDate = payment.Date, memo = payment.Notes, externalId = paymentId, customFieldList = this.getPaymentFields(payment, netSuiteOrder, api), arAcct = new RecordRef { internalId = "1229" }, // MercadoLibre undepFunds = true }; }