Нормализовать НДС follow-up за месяц в налоговый квартал
This commit is contained in:
@@ -4102,6 +4102,33 @@ describe("address query limited taxonomy and stage diagnostics", { timeout: 9000
|
||||
expect(result?.debug.route_expectation_status).toBe("matched");
|
||||
});
|
||||
|
||||
it("normalizes carried monthly debt period into VAT tax quarter for same-period follow-up", async () => {
|
||||
const service = new AddressQueryService();
|
||||
const result = await service.tryHandle("а какой ндс мы должны примерно заплатить за этот период?", {
|
||||
followupContext: {
|
||||
previous_intent: "receivables_confirmed_as_of_date",
|
||||
previous_filters: {
|
||||
organization: 'ООО "Альтернатива Плюс"',
|
||||
period_from: "2017-05-01",
|
||||
period_to: "2017-05-31",
|
||||
as_of_date: "2017-05-31"
|
||||
},
|
||||
previous_anchor_type: "organization",
|
||||
previous_anchor_value: 'ООО "Альтернатива Плюс"',
|
||||
target_intent: "vat_liability_confirmed_for_tax_period"
|
||||
}
|
||||
});
|
||||
|
||||
expect(result?.handled).toBe(true);
|
||||
expect(result?.debug.detected_intent).toBe("vat_liability_confirmed_for_tax_period");
|
||||
expect(result?.debug.selected_recipe).toBe("address_vat_liability_confirmed_tax_period_v1");
|
||||
expect(result?.debug.extracted_filters.period_from).toBe("2017-04-01");
|
||||
expect(result?.debug.extracted_filters.period_to).toBe("2017-06-30");
|
||||
expect(result?.debug.reasons).toContain("period_from_from_followup_context");
|
||||
expect(result?.debug.reasons).toContain("period_derived_from_tax_quarter_for_confirmed_vat_liability");
|
||||
expect(String(result?.reply_text ?? "")).toContain("01.04.2017..30.06.2017");
|
||||
}, 35000);
|
||||
|
||||
it("routes customer lifecycle question into dedicated aggregate recipe", async () => {
|
||||
const service = new AddressQueryService();
|
||||
const result = await service.tryHandle("Какие заказчики работали с нами в 2020 году?");
|
||||
|
||||
Reference in New Issue
Block a user