如何在Entity_Level和tooks_level销售订单中添加折扣?

发布于 2025-01-25 19:24:15 字数 1451 浏览 3 评论 0原文

我正在尝试将Zoho图书发票系统与WooCommerce整合在一起。我正在使用 api 后来将其转换为发票,并试图增加两个级别的折扣。一个在tooke_level中附有订单项的一个,另一个在entity_level中应应用于税收计算之前的订单项的小计。

我面临的问题是API仅在entity_level(忽略ittem_level)上应用折扣,而我在API请求主体中添加了这两个折扣。 (请参阅附件

请求正文:

{
        "customer_id": "123456789",
        "date": "2022-03-05",
        "shipment_date": "2022-03-05",
        "is_inclusive_tax": false,
        "place_of_supply": "DL",
        "salesperson_name": "ABC",
        "gst_treatment": "consumer",
        "line_items": [
          {
             "rate": '999',
             "name": "Product_Name",
             "description": "Product_Descp",
             "quantity": 1,
             "product_type": "goods",
             "discount": "10%",
             "tax_id": "123456000",
             "hsn_or_sac": "200200"
          }
        ],
        "billing_address_id": "12347890",
        "shipping_address_id": "12347891",
        "tax_id": "123456000",
        "discount": "202.89"
        "shipping_charge": "40",
        "delivery_method": "delivery_method_name",
    }

我希望两者都可以一起工作,因为我需要显示优惠券Entity_level的折扣(如果在结帐期间使用优惠券)和tooks_level的销售折扣。 是否有任何设置或其他方法可以同时增加两个级别的折扣?

任何帮助将不胜感激!

谢谢,

I'm trying to integrate ZOHO books invoice system with Woocommerce. I'm creating a sales order using API which is later converted into an Invoice and trying to add discounts for both levels. One in items_level that is attached with line items and another in entity_level should be applied on the subtotal of line items before the tax calculation.

The issue I'm facing is the API applying the discount only at entity_level(ignoring items_level), whereas I'm adding discounts for both in the API request body. (See the attachment)

Request body:

{
        "customer_id": "123456789",
        "date": "2022-03-05",
        "shipment_date": "2022-03-05",
        "is_inclusive_tax": false,
        "place_of_supply": "DL",
        "salesperson_name": "ABC",
        "gst_treatment": "consumer",
        "line_items": [
          {
             "rate": '999',
             "name": "Product_Name",
             "description": "Product_Descp",
             "quantity": 1,
             "product_type": "goods",
             "discount": "10%",
             "tax_id": "123456000",
             "hsn_or_sac": "200200"
          }
        ],
        "billing_address_id": "12347890",
        "shipping_address_id": "12347891",
        "tax_id": "123456000",
        "discount": "202.89"
        "shipping_charge": "40",
        "delivery_method": "delivery_method_name",
    }

I want both to work together because I need to show coupons discounts at entity_level (if coupon applied during checkout) and sales discount at items_level.
Is there any setting or any other way to add discounts on both levels simultaneously?

Any help will be much appreciated!

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疧_╮線 2025-02-01 19:24:15

Zoho书籍不允许同时应用实体和项目级别的折扣。您必须通过将API密钥“ discount_type”设置为“ entity_level”或“ item_level”来选择其中之一。

API有另一个键来计算税前的折扣,即“ is_discount_before_tax”。

Zoho Books does not allow entity and item level discounts to be applied simultaneously. You have to choose one of them by setting the API key "discount_type" to be "entity_level" or "item_level".

The API has another key to calculate the discount before tax, which is "is_discount_before_tax".

雄赳赳气昂昂 2025-02-01 19:24:15

我们将发票级别的折扣添加为调整(couse的负值)。您可以对偏好进行调整。

在API中,字段名称为“调整”和“ awithment_description”。这种方法对我们有用,尽管不是理想的。所有调整都涉及COA中的“其他费用”。

We add invoice level discount as an adjustment (with a negative value, of couse). You can enable adjustments in Preferences.

screenshot of Zoho Books add/edit invoice form

In API, the field names are "adjustment" and "adjustment_description". This method works for us, although not ideal. All adjustments go into "Other Charges" in COA.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文