Compare commits
4 Commits
2e77d2eb6e
...
f4da5387c4
| Author | SHA1 | Date |
|---|---|---|
|
|
f4da5387c4 | |
|
|
3c40cb93f1 | |
|
|
0a0d1d9d20 | |
|
|
812802361a |
|
|
@ -1,2 +1,2 @@
|
|||
Branch: invoice-update
|
||||
Commit: 50538bb64faa7f46d643ed60b9f0f272d5624a39
|
||||
Branch: main
|
||||
Commit: 895342a8ba976caa41f4b5b9fdec1c684e47dc5d
|
||||
|
|
|
|||
13
Dockerfile
13
Dockerfile
|
|
@ -15,7 +15,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy pyproject.toml first for layer caching
|
||||
# Prefer IPv4 over unrouted IPv6 in glibc to prevent PyPI connection timeouts
|
||||
RUN echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf
|
||||
|
||||
# Use Astral's uv package manager for fast, parallel, cached installations
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
ENV UV_HTTP_TIMEOUT=300
|
||||
|
||||
# Copy pyproject.toml first
|
||||
COPY pyproject.toml ./
|
||||
COPY README.md ./
|
||||
|
||||
|
|
@ -26,8 +33,8 @@ COPY app ./app
|
|||
# Copy git info metadata if generated on host
|
||||
COPY .git_api_info* /app/.git_api_info
|
||||
|
||||
# Install project and CLI scripts into PATH
|
||||
RUN pip install --no-cache-dir -e .
|
||||
# Install project and CLI scripts into system PATH using persistent BuildKit cache
|
||||
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system -e .
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
|
|
|||
|
|
@ -420,6 +420,7 @@ class AdminPaymentService:
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
|
||||
<title>Tax Invoice - {inv_number}</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
|
|
@ -431,6 +432,18 @@ class AdminPaymentService:
|
|||
padding: 0;
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
}}
|
||||
/* Prevent iOS WebKit / Safari automatic data detector and link underlining */
|
||||
a,
|
||||
a[x-apple-data-detectors],
|
||||
a[href^="mailto:"],
|
||||
a[href^="tel:"] {{
|
||||
color: inherit !important;
|
||||
text-decoration: none !important;
|
||||
font-size: inherit !important;
|
||||
font-family: inherit !important;
|
||||
font-weight: inherit !important;
|
||||
line-height: inherit !important;
|
||||
}}
|
||||
body {{
|
||||
background-color: #f8fafc;
|
||||
color: #1e293b;
|
||||
|
|
@ -557,7 +570,8 @@ class AdminPaymentService:
|
|||
margin-bottom: 24px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}}
|
||||
table {{
|
||||
width: 100%;
|
||||
|
|
@ -618,6 +632,73 @@ class AdminPaymentService:
|
|||
color: #94a3b8;
|
||||
line-height: 1.6;
|
||||
}}
|
||||
.payment-id-val {{
|
||||
word-break: break-all;
|
||||
display: inline-block;
|
||||
}}
|
||||
@media (max-width: 640px) {{
|
||||
body {{
|
||||
padding: 12px 8px;
|
||||
}}
|
||||
.no-print-bar {{
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 12px;
|
||||
padding: 12px 14px;
|
||||
text-align: center;
|
||||
}}
|
||||
.no-print-actions {{
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}}
|
||||
.no-print-actions .btn {{
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
padding: 10px 8px;
|
||||
font-size: 13px;
|
||||
}}
|
||||
.invoice-card {{
|
||||
padding: 24px 16px;
|
||||
border-radius: 12px;
|
||||
}}
|
||||
.header {{
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
padding-bottom: 18px;
|
||||
margin-bottom: 20px;
|
||||
}}
|
||||
.invoice-badge-box {{
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}}
|
||||
.grid-details {{
|
||||
grid-template-columns: 1fr;
|
||||
gap: 20px;
|
||||
margin-bottom: 24px;
|
||||
}}
|
||||
.grid-payment-overview {{
|
||||
text-align: left !important;
|
||||
}}
|
||||
.detail-text {{
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
}}
|
||||
.table-wrap table {{
|
||||
min-width: 480px;
|
||||
}}
|
||||
th, td {{
|
||||
padding: 10px 12px;
|
||||
font-size: 13px;
|
||||
}}
|
||||
.summary-wrap {{
|
||||
justify-content: stretch;
|
||||
}}
|
||||
.summary-card {{
|
||||
width: 100%;
|
||||
}}
|
||||
}}
|
||||
@media print {{
|
||||
body {{
|
||||
background-color: #ffffff !important;
|
||||
|
|
@ -640,7 +721,7 @@ class AdminPaymentService:
|
|||
<div style="font-size: 13px; color: #64748b; font-weight: 500;">
|
||||
Acupedia Official Tax Invoice • <strong>{inv_number}</strong>
|
||||
</div>
|
||||
<div style="display: flex; gap: 8px;">
|
||||
<div class="no-print-actions" style="display: flex; gap: 8px;">
|
||||
<button class="btn btn-secondary" onclick="window.close()">Close</button>
|
||||
<button class="btn btn-primary" onclick="window.print()">
|
||||
<svg width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"></path></svg>
|
||||
|
|
@ -672,12 +753,11 @@ class AdminPaymentService:
|
|||
{f'<div class="detail-text">{cust_phone}</div>' if cust_phone else ''}
|
||||
<div class="detail-text" style="color: #64748b; margin-top: 4px;">{cust_address}</div>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<div class="grid-payment-overview" style="text-align: right;">
|
||||
<div class="section-label">Payment Overview</div>
|
||||
<div class="detail-text">Gateway Reference: <span class="detail-strong" style="font-family: monospace;">{payment_id}</span></div>
|
||||
<div class="detail-text">Payment ID: <span class="detail-strong payment-id-val" style="font-family: monospace;">{payment_id}</span></div>
|
||||
<div class="detail-text">Payment Method: <span class="detail-strong">{pay_method}</span></div>
|
||||
<div class="detail-text">Currency: <span class="detail-strong">{currency}</span></div>
|
||||
<div class="detail-text">Status: <span class="detail-strong" style="color: #059669;">Completed / Captured</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue