定制 aligent/orocommerce-invoices-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aligent/orocommerce-invoices-bundle

Composer 安装命令:

composer require aligent/orocommerce-invoices-bundle

包简介

OroCommerce Bundle to allow Customers to View/Pay Invoices via Storefront Portal

README 文档

README

This Bundle adds the ability for Customers to View/Pay Invoices for Storefront Customer Portal.

Customer Invoice List

Customer Invoice Payment

Features

  • Customers can List, Filter, and View their Open/Paid/Overdue Invoices
  • Invoices are automatically marked as Overdue after Due Date has elapsed
  • Customers can make Payments against one or more Invoices
  • Customers can pay custom Amounts against each Invoice
  • The allowed Payment Methods for Invoices can be configured
  • Custom message can be displayed on Payment form
  • Successful Invoice Payment amounts are automatically subtracted from the remaining Invoice balance
  • Invoices are automatically marked as Paid after the full balance is successfully paid
  • Invoices can be Listed, Filtered, and Viewed in the Oro Backoffice (admin) panel, including associated Invoice Payments
  • Invoices Feature can be switched off globally or per-Website
  • Access to Invoices and Payments can be controlled via Customer User Role (ACL) permissions

Requirements

  • OroCommerce 5.0

Important Notes/Caveats

  • Invoices are entirely standalone entities, they currently have no relationship to Oro Orders or the Checkout, or the Payment Term method.
  • Invoices can currently only be created using the API (e.g. pushing Invoices into Oro from a third-party system), or by Oro customization.
  • The Balance Remaining against each Invoice is only updated using the amount of the current successful Invoice Payment, not the sum total of all Invoice Payments in Oro (so that the total amount paid against each invoice can be set via the API). This allows support for offline/external payments.
  • This bundle does not currently trigger email notifications (e.g. Invoice Created, Invoice Due/Overdue, InvoicePayment Confirmation).
  • Payment Methods which redirect to external payment forms (e.g. PayPal Express) may not be supported, they have not been tested.
  • Invoice Payments are flagged active: true, this is updated to active: false once a successful PaymentTransaction has been made.

Installation and Usage

NOTE: Adjust instructions as needed for your local environment

Installation

Install via Composer

composer require aligent/orocommerce-invoices-bundle

Once installed, run platform update to perform the installation:

php bin/console oro:platform:update --env=prod

Configuration

Once installed, visit System Configuration => Commerce => Orders => Invoice Management.

Configuration

From here it is possible to enable/disable the Invoices feature, select the available Payment Methods for Invoice Payments, and optionally display a custom message on the Invoice Payment form.

Demo Data Fixtures

For testing purposes this Bundle includes a set of sample Invoices with various statuses (open, overdue, paid). These can be loaded in a development environment using the following command:

php bin/console oro:migration:data:load --env=dev --fixtures-type=demo --bundles=AligentInvoiceBundle -vvv

Database Modifications

Database Tables Created

  • aligent_invoice - holds Invoices (Invoice)
  • aligent_invoice_line_item holds Invoice Line Items (InvoiceLineItem)
  • aligent_invoice_payment holds Invoice Payments (InvoicePayment)
  • aligent_invoice_payment_line_item holds Invoice Payment Line Items (InvoicePaymentLineItem)
  • oro_enum_invoice_status holds Invoice Status enum values (Extend\Entity\EV_Invoice_Status)

Sample API Payloads

Create New Invoice

POST /admin/api/aligentinvoices

{
    "data": {
        "type": "aligentinvoices",
        "id": "new-invoice-'1",
        "attributes": {
            "invoiceNo": "INV-413",
            "issueDate": "2022-06-01",
            "dueDate": "2022-07-01",
            "amount": "100.0000",
            "currency": "AUD",
            "totalTax": "11.11",
            "amountPaid": "80.0000",
            "createdAt": "2022-06-01T16:15:20Z",
            "updatedAt": "2022-06-14T02:10:24Z"
        },
        "relationships": {
            "customer": {
                "data": {
                    "type": "customers",
                    "id": "7"
                }
            },
            "lineItems": {
                "data": [
                    {
                        "type": "aligentinvoicelineitems",
                        "id": "line-item-1"
                    },
                    {
                        "type": "aligentinvoicelineitems",
                        "id": "line-item-2"
                    }
                ]
            },
            "status": {
                "data": {
                    "type": "aligentinvoicestatuses",
                    "id": "open"
                }
            }
        }
    },
    "included": [
        {
            "type": "aligentinvoicelineitems",
            "id": "line-item-1",
            "attributes": {
                "amount": "25.0000",
                "currency": "AUD",
                "summary": "Line Item 1"
            }
        },
        {
            "type": "aligentinvoicelineitems",
            "id": "line-item-2",
            "attributes": {
                "amount": "75.0000",
                "currency": "AUD",
                "summary": "Line Item 2"
            }
        }
    ]
}

Core Overrides & Extensions

None

Roadmap / Remaining Tasks

  • OroCommerce 5.0 Support
  • Implement Unit Tests
  • Implement Demo Invoice Data Fixtures (using aligent/oro-fixtures)
  • Update Payment Methods Configuration to use Rules instead of Methods (#2)
  • Improve reliability/usability of Invoice Payment JavaScript components and SaveState feature
  • Add ability to disable Invoice Payments globally (view-only mode)
  • Implement Admin CRUD UI for Invoices with User Role ACL Permissions
  • Automatically clean up old pending Invoice Payments (but preserve failed records)
  • Ensure support for externally hosted Payment Methods (e.g. PayPal Express)

Potential Future Enhancements

  • Implement Payment Confirmation Emails
  • Automatically raise Invoices for OroCommerce Orders paid on Account (via Payment Term)
  • Optionally Link Invoice Line Items to OroCommerce Orders
  • Notifications (email and on-site) for Due/Overdue Invoices
  • Oro Backoffice Dashboard Widgets (Due/Overdue Invoices)

aligent/orocommerce-invoices-bundle 适用场景与选型建议

aligent/orocommerce-invoices-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 07 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 aligent/orocommerce-invoices-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aligent/orocommerce-invoices-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 aligent/orocommerce-invoices-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2022-07-27