本文整理汇总了Java中org.killbill.billing.invoice.api.Invoice.getInvoiceDate方法的典型用法代码示例。如果您正苦于以下问题:Java Invoice.getInvoiceDate方法的具体用法?Java Invoice.getInvoiceDate怎么用?Java Invoice.getInvoiceDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.killbill.billing.invoice.api.Invoice
的用法示例。
在下文中一共展示了Invoice.getInvoiceDate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BusinessInvoiceModelDao
import org.killbill.billing.invoice.api.Invoice; //导入方法依赖的package包/类
public BusinessInvoiceModelDao(final Account account,
final Long accountRecordId,
final Invoice invoice,
final Long invoiceRecordId,
final CurrencyConverter currencyConverter,
@Nullable final AuditLog creationAuditLog,
final Long tenantRecordId,
@Nullable final ReportGroup reportGroup) {
this(invoiceRecordId,
invoice.getId(),
invoice.getInvoiceNumber(),
invoice.getInvoiceDate(),
invoice.getTargetDate(),
invoice.getCurrency() == null ? null : invoice.getCurrency().toString(),
invoice.getBalance(),
currencyConverter.getConvertedValue(invoice.getBalance(), invoice),
invoice.getPaidAmount(),
currencyConverter.getConvertedValue(invoice.getPaidAmount(), invoice),
invoice.getChargedAmount(),
currencyConverter.getConvertedValue(invoice.getChargedAmount(), invoice),
invoice.getOriginalChargedAmount(),
currencyConverter.getConvertedValue(invoice.getOriginalChargedAmount(), invoice),
invoice.getCreditedAmount(),
currencyConverter.getConvertedValue(invoice.getCreditedAmount(), invoice),
invoice.getRefundedAmount(),
currencyConverter.getConvertedValue(invoice.getRefundedAmount(), invoice),
currencyConverter.getConvertedCurrency(),
invoice.getCreatedDate(),
creationAuditLog != null ? creationAuditLog.getUserName() : null,
creationAuditLog != null ? creationAuditLog.getReasonCode() : null,
creationAuditLog != null ? creationAuditLog.getComment() : null,
account.getId(),
account.getName(),
account.getExternalKey(),
accountRecordId,
tenantRecordId,
reportGroup);
}
示例2: taxDateForInvoiceItem
import org.killbill.billing.invoice.api.Invoice; //导入方法依赖的package包/类
@Override
public DateTime taxDateForInvoiceItem(UUID kbTenantId, Account account, Invoice invoice,
InvoiceItem item, Iterable<PluginProperty> pluginProperties) {
LocalDate applicableDate = null;
switch (mode) {
case Invoice:
applicableDate = invoice.getInvoiceDate();
break;
case Start:
case StartThenEnd:
applicableDate = item.getStartDate();
if (applicableDate == null && mode == DateMode.StartThenEnd) {
applicableDate = item.getEndDate();
}
break;
default:
applicableDate = item.getEndDate();
if (applicableDate == null && mode == DateMode.EndThenStart) {
applicableDate = item.getStartDate();
}
}
if (applicableDate == null && fallBackToInvoiceDate) {
applicableDate = invoice.getInvoiceDate();
}
if (applicableDate != null) {
DateTimeZone taxationTimeZone = account.getTimeZone();
if (taxationTimeZone == null) {
taxationTimeZone = defaultTimeZone;
}
return applicableDate.toDateTimeAtStartOfDay(taxationTimeZone);
}
// use item or invoice creation dates
if (fallBackToInvoiceItemCreatedDate && item.getCreatedDate() != null) {
return item.getCreatedDate();
}
if (fallBackToInvoiceCreatedDate && invoice.getCreatedDate() != null) {
return invoice.getCreatedDate();
}
return null;
}
示例3: BusinessInvoiceItemBaseModelDao
import org.killbill.billing.invoice.api.Invoice; //导入方法依赖的package包/类
public BusinessInvoiceItemBaseModelDao(final Account account,
final Long accountRecordId,
final Invoice invoice,
final InvoiceItem invoiceItem,
@Nullable final ItemSource itemSource,
final Long invoiceItemRecordId,
final Long secondInvoiceItemRecordId,
@Nullable final SubscriptionBundle bundle,
@Nullable final Plan plan,
@Nullable final PlanPhase planPhase,
final CurrencyConverter currencyConverter,
@Nullable final AuditLog creationAuditLog,
final Long tenantRecordId,
@Nullable final ReportGroup reportGroup) {
this(invoiceItemRecordId,
secondInvoiceItemRecordId,
invoiceItem.getId(),
invoice.getId(),
invoice.getInvoiceNumber(),
invoice.getCreatedDate(),
invoice.getInvoiceDate(),
invoice.getTargetDate(),
invoice.getCurrency() == null ? null : invoice.getCurrency().toString(),
invoice.getBalance(),
currencyConverter.getConvertedValue(invoice.getBalance(), invoice),
invoice.getPaidAmount(),
currencyConverter.getConvertedValue(invoice.getPaidAmount(), invoice),
invoice.getChargedAmount(),
currencyConverter.getConvertedValue(invoice.getChargedAmount(), invoice),
invoice.getOriginalChargedAmount(),
currencyConverter.getConvertedValue(invoice.getOriginalChargedAmount(), invoice),
invoice.getCreditedAmount(),
currencyConverter.getConvertedValue(invoice.getCreditedAmount(), invoice),
invoice.getRefundedAmount(),
currencyConverter.getConvertedValue(invoice.getRefundedAmount(), invoice),
invoiceItem.getInvoiceItemType().toString(),
itemSource,
bundle == null ? null : bundle.getId(),
bundle == null ? null : bundle.getExternalKey(),
(plan != null && plan.getProduct() != null) ? plan.getProduct().getName() : null,
(plan != null && plan.getProduct() != null) ? plan.getProduct().getCatalogName() : null,
(plan != null && plan.getProduct().getCategory() != null) ? plan.getProduct().getCategory().toString() : null,
planPhase != null ? planPhase.getName() : null,
invoiceItem.getUsageName(),
(planPhase != null && planPhase.getPhaseType() != null) ? planPhase.getPhaseType().toString() : null,
(planPhase != null && planPhase.getRecurring() != null && planPhase.getRecurring().getBillingPeriod() != null) ? planPhase.getRecurring().getBillingPeriod().toString() : null,
invoiceItem.getStartDate(),
/* Populate end date for fixed items for convenience (null in invoice_items table) */
BusinessInvoiceItemUtils.computeServicePeriodEndDate(invoiceItem, planPhase, bundle),
invoiceItem.getAmount(),
currencyConverter.getConvertedValue(invoiceItem, invoice),
invoiceItem.getCurrency() == null ? null : invoiceItem.getCurrency().toString(),
invoiceItem.getLinkedItemId(),
currencyConverter.getConvertedCurrency(),
invoiceItem.getCreatedDate(),
creationAuditLog != null ? creationAuditLog.getUserName() : null,
creationAuditLog != null ? creationAuditLog.getReasonCode() : null,
creationAuditLog != null ? creationAuditLog.getComment() : null,
account.getId(),
account.getName(),
account.getExternalKey(),
accountRecordId,
tenantRecordId,
reportGroup);
}
示例4: BusinessAccountModelDao
import org.killbill.billing.invoice.api.Invoice; //导入方法依赖的package包/类
public BusinessAccountModelDao(final Account account,
final Account parentAccount,
final Long accountRecordId,
final BigDecimal balance,
@Nullable final Invoice oldestUnpaidInvoice,
@Nullable final Invoice lastInvoice,
@Nullable final PaymentTransaction lastCaptureOrPurchaseTransaction,
final Integer nbActiveBundles,
final CurrencyConverter currencyConverter,
@Nullable final AuditLog creationAuditLog,
final Long tenantRecordId,
@Nullable final ReportGroup reportGroup) {
this(account.getEmail(),
account.getFirstNameLength(),
account.getCurrency() == null ? null : account.getCurrency().toString(),
account.getBillCycleDayLocal(),
account.getPaymentMethodId(),
account.getTimeZone() == null ? null : account.getTimeZone().toString(),
account.getLocale(),
account.getAddress1(),
account.getAddress2(),
account.getCompanyName(),
account.getCity(),
account.getStateOrProvince(),
account.getCountry(),
account.getPostalCode(),
account.getPhone(),
account.isMigrated(),
account.isNotifiedForInvoices(),
account.getUpdatedDate(),
balance,
currencyConverter.getConvertedValue(balance, account),
oldestUnpaidInvoice == null ? null : oldestUnpaidInvoice.getInvoiceDate(),
oldestUnpaidInvoice == null ? null : oldestUnpaidInvoice.getBalance(),
oldestUnpaidInvoice == null ? null : oldestUnpaidInvoice.getCurrency().toString(),
currencyConverter.getConvertedValue(oldestUnpaidInvoice),
oldestUnpaidInvoice == null ? null : oldestUnpaidInvoice.getId(),
lastInvoice == null ? null : lastInvoice.getInvoiceDate(),
lastInvoice == null ? null : lastInvoice.getBalance(),
lastInvoice == null ? null : lastInvoice.getCurrency().toString(),
currencyConverter.getConvertedValue(lastInvoice),
lastInvoice == null ? null : lastInvoice.getId(),
lastCaptureOrPurchaseTransaction == null ? null : lastCaptureOrPurchaseTransaction.getEffectiveDate(),
lastCaptureOrPurchaseTransaction == null ? null : lastCaptureOrPurchaseTransaction.getTransactionStatus().toString(),
nbActiveBundles,
currencyConverter.getConvertedCurrency(),
account.getCreatedDate(),
creationAuditLog != null ? creationAuditLog.getUserName() : null,
creationAuditLog != null ? creationAuditLog.getReasonCode() : null,
creationAuditLog != null ? creationAuditLog.getComment() : null,
account.getId(),
account.getName(),
account.getExternalKey(),
parentAccount != null ? parentAccount.getId() : null,
parentAccount != null ? parentAccount.getName() : null,
parentAccount != null ? parentAccount.getExternalKey() : null,
accountRecordId,
tenantRecordId,
reportGroup);
}