feat(orders): issued-order PDF on the shared invoice/confirmation template
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -256,7 +256,7 @@ describe("renderIssuedOrderHtml", () => {
|
||||
const items = [
|
||||
{
|
||||
description: "Materiál",
|
||||
item_description: null,
|
||||
item_description: "Detailní popis položky",
|
||||
quantity: 2,
|
||||
unit: "ks",
|
||||
unit_price: 100,
|
||||
@@ -264,18 +264,24 @@ describe("renderIssuedOrderHtml", () => {
|
||||
},
|
||||
];
|
||||
|
||||
it("renders the PO number, items, and both party names", () => {
|
||||
it("renders the PO number, items, and both party names (PO direction)", () => {
|
||||
const html = renderIssuedOrderHtml(
|
||||
order,
|
||||
items,
|
||||
{ name: "Dodavatel" },
|
||||
{ name: "Dodavatel s.r.o." },
|
||||
{ company_name: "Naše firma" },
|
||||
"cs",
|
||||
);
|
||||
expect(html).toContain("26720001");
|
||||
expect(html).toContain("Materiál");
|
||||
expect(html).toContain("Dodavatel");
|
||||
// Optional item sub-line.
|
||||
expect(html).toContain("Detailní popis položky");
|
||||
// PO direction: the customer record is the Dodavatel (supplier), our
|
||||
// company is the Odběratel (buyer).
|
||||
expect(html).toContain("Dodavatel s.r.o.");
|
||||
expect(html).toContain("Naše firma");
|
||||
expect(html).toContain("Dodavatel");
|
||||
expect(html).toContain("Odběratel");
|
||||
});
|
||||
|
||||
it("strips script tags from notes", () => {
|
||||
|
||||
Reference in New Issue
Block a user