mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE): Remove credit_note and ppn fields
This commit is contained in:
@@ -382,15 +382,9 @@ const createPDFDocument = (params: CustomerPaymentExportPDFParams) => {
|
|||||||
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
||||||
<Text>{formatCurrency(item.price)}</Text>
|
<Text>{formatCurrency(item.price)}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={[pdfStyles.tableCellRight, { flex: 1 }]}>
|
|
||||||
<Text>{formatCurrency(item.credit_note)}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
||||||
<Text>{formatCurrency(item.final_price)}</Text>
|
<Text>{formatCurrency(item.final_price)}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={[pdfStyles.tableCellRight, { flex: 0.8 }]}>
|
|
||||||
<Text>{formatNumber(item.ppn)}%</Text>
|
|
||||||
</View>
|
|
||||||
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
||||||
<Text>{formatCurrency(item.total_price)}</Text>
|
<Text>{formatCurrency(item.total_price)}</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -468,11 +462,6 @@ const createPDFDocument = (params: CustomerPaymentExportPDFParams) => {
|
|||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={[pdfStyles.tableCellRight, { flex: 1 }]}>
|
|
||||||
<Text>
|
|
||||||
{formatCurrency(customerReport.summary.total_credit_note)}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
|
||||||
<Text>
|
<Text>
|
||||||
{formatCurrency(customerReport.summary.total_final_amount)}
|
{formatCurrency(customerReport.summary.total_final_amount)}
|
||||||
|
|||||||
@@ -37,9 +37,7 @@ export const generateCustomerPaymentExcel = (
|
|||||||
'Berat (Kg)': formatNumber(item.weight || 0),
|
'Berat (Kg)': formatNumber(item.weight || 0),
|
||||||
AVG: formatNumber(item.average_weight || 0),
|
AVG: formatNumber(item.average_weight || 0),
|
||||||
'Harga Awal': formatCurrency(item.price || 0),
|
'Harga Awal': formatCurrency(item.price || 0),
|
||||||
CN: formatCurrency(item.credit_note || 0),
|
|
||||||
'Harga Akhir': formatCurrency(item.final_price || 0),
|
'Harga Akhir': formatCurrency(item.final_price || 0),
|
||||||
'PPN (%)': formatNumber(item.ppn || 0),
|
|
||||||
Total: formatCurrency(item.total_price || 0),
|
Total: formatCurrency(item.total_price || 0),
|
||||||
Pembayaran: formatCurrency(item.payment_amount || 0),
|
Pembayaran: formatCurrency(item.payment_amount || 0),
|
||||||
'Saldo Piutang': formatCurrency(item.accounts_receivable || 0),
|
'Saldo Piutang': formatCurrency(item.accounts_receivable || 0),
|
||||||
@@ -63,11 +61,9 @@ export const generateCustomerPaymentExcel = (
|
|||||||
'Harga Awal': formatCurrency(
|
'Harga Awal': formatCurrency(
|
||||||
customerReport.summary.total_initial_amount || 0
|
customerReport.summary.total_initial_amount || 0
|
||||||
),
|
),
|
||||||
CN: formatCurrency(customerReport.summary.total_credit_note || 0),
|
|
||||||
'Harga Akhir': formatCurrency(
|
'Harga Akhir': formatCurrency(
|
||||||
customerReport.summary.total_final_amount || 0
|
customerReport.summary.total_final_amount || 0
|
||||||
),
|
),
|
||||||
'PPN (%)': '',
|
|
||||||
Total: formatCurrency(customerReport.summary.total_grand_amount || 0),
|
Total: formatCurrency(customerReport.summary.total_grand_amount || 0),
|
||||||
Pembayaran: formatCurrency(customerReport.summary.total_payment || 0),
|
Pembayaran: formatCurrency(customerReport.summary.total_payment || 0),
|
||||||
'Saldo Piutang': formatCurrency(
|
'Saldo Piutang': formatCurrency(
|
||||||
|
|||||||
@@ -417,21 +417,6 @@ const CustomerPaymentTab = () => {
|
|||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'credit_note',
|
|
||||||
header: 'CN',
|
|
||||||
accessorKey: 'credit_note',
|
|
||||||
enableSorting: false,
|
|
||||||
cell: (props) => {
|
|
||||||
const value = props.row.original.credit_note;
|
|
||||||
return <div className='text-right'>{formatCurrency(value)}</div>;
|
|
||||||
},
|
|
||||||
footer: () => (
|
|
||||||
<div className='text-right font-semibold text-gray-900'>
|
|
||||||
{formatCurrency(summary.total_credit_note) || '-'}
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'final_price',
|
id: 'final_price',
|
||||||
header: 'Harga Akhir',
|
header: 'Harga Akhir',
|
||||||
@@ -447,19 +432,6 @@ const CustomerPaymentTab = () => {
|
|||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'ppn',
|
|
||||||
header: 'PPN (%)',
|
|
||||||
accessorKey: 'ppn',
|
|
||||||
enableSorting: false,
|
|
||||||
cell: (props) => {
|
|
||||||
const value = props.row.original.ppn;
|
|
||||||
return <div className='text-right'>{formatNumber(value)}%</div>;
|
|
||||||
},
|
|
||||||
footer: () => (
|
|
||||||
<div className='text-right font-semibold text-gray-900'>-</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'total',
|
id: 'total',
|
||||||
header: 'Total',
|
header: 'Total',
|
||||||
|
|||||||
-4
@@ -12,9 +12,7 @@ export type CustomerPaymentRow = {
|
|||||||
weight: number;
|
weight: number;
|
||||||
average_weight: number;
|
average_weight: number;
|
||||||
price: number;
|
price: number;
|
||||||
credit_note: number;
|
|
||||||
final_price: number;
|
final_price: number;
|
||||||
ppn: number;
|
|
||||||
total_price: number;
|
total_price: number;
|
||||||
payment_amount: number;
|
payment_amount: number;
|
||||||
accounts_receivable: number;
|
accounts_receivable: number;
|
||||||
@@ -28,9 +26,7 @@ export type CustomerPaymentSummary = {
|
|||||||
total_qty: number;
|
total_qty: number;
|
||||||
total_weight: number;
|
total_weight: number;
|
||||||
total_initial_amount: number;
|
total_initial_amount: number;
|
||||||
total_credit_note: number;
|
|
||||||
total_final_amount: number;
|
total_final_amount: number;
|
||||||
total_ppn: number;
|
|
||||||
total_grand_amount: number;
|
total_grand_amount: number;
|
||||||
total_payment: number;
|
total_payment: number;
|
||||||
total_accounts_receivable: number;
|
total_accounts_receivable: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user