Phase7: Void/Refund logic
All checks were successful
Build and Push / build (push) Successful in 1m46s

This commit is contained in:
2026-05-25 22:52:54 +02:00
parent 6fed5b083b
commit 1c61111da3
3 changed files with 23 additions and 30 deletions

View File

@@ -24,9 +24,8 @@ import {
renderToBuffer,
} from "@react-pdf/renderer";
import type { CreditNote, Invoice } from "@/types";
import { BRAND, Logo, ACCENT_CREDIT_NOTE } from "./pdf-brand";
import { BRAND, Logo } from "./pdf-brand";
const ACCENT = ACCENT_CREDIT_NOTE;
// ---------------------------------------------------------------------------
// Localized strings
@@ -207,15 +206,15 @@ const styles = StyleSheet.create({
logoBlock: { flexDirection: "row", alignItems: "center" },
brandName: {
fontSize: 16,
color: ACCENT.primaryDark,
color: BRAND.primaryDark,
marginLeft: 8,
fontFamily: "Helvetica-Bold",
},
issuerBlock: { textAlign: "right", fontSize: 8.5, color: BRAND.mutedColor },
issuerName: { fontSize: 11, color: ACCENT.primaryDark, marginBottom: 2 },
issuerName: { fontSize: 11, color: BRAND.primaryDark, marginBottom: 2 },
docTitle: {
fontSize: 22,
color: ACCENT.primaryDark,
color: BRAND.primaryDark,
marginBottom: 8,
fontFamily: "Helvetica-Bold",
},
@@ -230,9 +229,9 @@ const styles = StyleSheet.create({
billTo: {
marginBottom: 24,
padding: 8,
backgroundColor: "#fdf2f2",
backgroundColor: "#f7f7f5",
borderLeftWidth: 3,
borderLeftColor: ACCENT.primary,
borderLeftColor: BRAND.primary,
},
billToLabel: { fontSize: 8, color: BRAND.mutedColor, marginBottom: 4 },
billToName: { fontSize: 11, marginBottom: 2 },
@@ -245,7 +244,7 @@ const styles = StyleSheet.create({
},
amountHeader: {
flexDirection: "row",
backgroundColor: ACCENT.primaryDark,
backgroundColor: BRAND.primaryDark,
color: "#ffffff",
paddingVertical: 5,
paddingHorizontal: 6,
@@ -273,17 +272,17 @@ const styles = StyleSheet.create({
flexDirection: "row",
justifyContent: "space-between",
borderTopWidth: 1,
borderTopColor: ACCENT.primaryDark,
borderTopColor: BRAND.primaryDark,
paddingTop: 6,
marginTop: 4,
},
totalsGrandLabel: {
color: ACCENT.primaryDark,
color: BRAND.primaryDark,
fontSize: 11,
fontFamily: "Helvetica-Bold",
},
totalsGrandValue: {
color: ACCENT.primaryDark,
color: BRAND.primaryDark,
fontSize: 11,
textAlign: "right",
fontFamily: "Helvetica-Bold",
@@ -353,7 +352,7 @@ function CreditNotePdfDocument({ creditNote, invoice }: CreditNotePdfProps) {
Issuer block from BRAND.issuer (shared with invoice). */}
<View style={styles.headerRow}>
<View style={styles.logoBlock}>
<Logo size={42} color={ACCENT.primary} />
<Logo size={42} color={BRAND.primary} />
<Text style={styles.brandName}>{BRAND.name}</Text>
</View>
<View style={styles.issuerBlock}>