ttpos-stats

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ttpos-stats

ttpos-stats

先读
ttpos-shared
。
First read
ttpos-shared
.

能回答的问题

Questions that can be answered

问题命令
今天营业额、实收、订单数、客单价
ttpos stats business
昨天、本周、本月的营业额
ttpos stats business --date yesterday
(或 this-week、this-month、last-month)
指定日期范围的营业额
ttpos stats business --from 2026-10-01 --to 2026-10-31
名下各门店营业额对比、哪家店卖得最好
ttpos stats shops --date yesterday
卖得最好的菜
ttpos stats products --date this-week
(
--by 2
按销售额)
各支付方式收了多少
ttpos stats payments --date yesterday
员工业绩、提成
ttpos stats commission --date this-month
QuestionCommand
Today's revenue, amount received, order count, and average order value
ttpos stats business
Yesterday's, this week's, or this month's revenue
ttpos stats business --date yesterday
(or this-week, this-month, last-month)
Revenue for a specified date range
ttpos stats business --from 2026-10-01 --to 2026-10-31
Revenue comparison across the account's stores and the best-performing store
ttpos stats shops --date yesterday
Best-selling dishes
ttpos stats products --date this-week
(
--by 2
ranks by sales revenue)
Amount collected through each payment method
ttpos stats payments --date yesterday
Staff performance and commissions
ttpos stats commission --date this-month

时间

Time

  • 不传时间就是今天;统计不能查全部历史。
  • --date
    取 today、yesterday、this-week、last-week、this-month、last-month;或用
    --from/--to YYYY-MM-DD
    ,最长 31 天,超过 exit 2,请分段查询后自己相加。
  • 按门店的营业日算:跨 0 点营业的店,凌晨的单算前一天,所以和按自然日数订单的结果可能不同。
  • If no time is specified, it means today; statistics cannot query the entire history.
  • --date
    accepts today, yesterday, this-week, last-week, this-month, and last-month; alternatively, use
    --from/--to YYYY-MM-DD
    for a maximum period of 31 days. Longer periods exit with code 2, so split the query into segments and add the results yourself.
  • Statistics are calculated by each store's business day. For stores operating past midnight, orders placed after midnight are counted toward the previous day, so the results may differ from order counts based on the calendar day.

读结果

Reading the results

  • stats business
    的字段:
    total_sales
    营业额,
    total_received_price
    实收,
    total_order_num
    订单数,
    avg_order_price
    平均每单金额,
    total_people_num
    用餐人数,
    total_refund_money
    退款,
    total_cancel_order_num
    取消单数,
    total_discount_money
    优惠,
    payment_method_incomes
    各支付方式收入。
  • total_order_num
    只算已完成的单。用户问"一共有多少笔订单"(含待付款、已取消)时用
    ttpos order list
    的
    count
    ;两个数不一样时都说清楚口径。
  • "客单价"在门店报表里有时指人均。用户问客单价时说明这里是"平均每单金额";人均需要
    total_people_num
    ,为 0 表示没有登记人数,不要自己用订单数代替。
  • stats shops
    逐店查询账号能访问的全部门店,门店多时要等一会儿。某家店失败时
    error
    有原因,其他店照常返回;汇报时把失败的店单独说明,不要当成 0。
  • stats products
    只返回前 10;
    stats commission
    账号没有提成权限时只返回自己。
退出码见
ttpos help exit-codes
。
  • stats business
    fields:
    total_sales
    is revenue,
    total_received_price
    is the amount received,
    total_order_num
    is the order count,
    avg_order_price
    is the average amount per order,
    total_people_num
    is the number of diners,
    total_refund_money
    is refunds,
    total_cancel_order_num
    is the number of cancelled orders,
    total_discount_money
    is discounts, and
    payment_method_incomes
    contains income by payment method.
  • total_order_num
    only includes completed orders. When the user asks for the total number of orders, including pending-payment and cancelled orders, use the
    count
    from
    ttpos order list
    . If the two values differ, clearly explain the counting basis for each.
  • In store reports, "average order value" sometimes refers to per-person spending. When the user asks about average order value, explain that this is the "average amount per order." Per-person spending requires
    total_people_num
    ; a value of 0 means no diner count was recorded, so do not substitute the order count.
  • stats shops
    queries every store accessible to the account one by one, which may take a while when there are many stores. If a store fails, the reason is provided in
    error
    , while the other stores are still returned. Report failed stores separately and do not treat them as 0.
  • stats products
    only returns the top 10 results. If the account does not have permission to view commissions,
    stats commission
    only returns the user's own data.
See
ttpos help exit-codes
for exit codes.