-
+
+
);
}
diff --git a/client/src/containers/Drawers/PaymentReceiveDetailDrawer/PaymentReceiveDrawer.module.scss b/client/src/containers/Drawers/PaymentReceiveDetailDrawer/PaymentReceiveDrawer.module.scss
new file mode 100644
index 000000000..564bf5e42
--- /dev/null
+++ b/client/src/containers/Drawers/PaymentReceiveDetailDrawer/PaymentReceiveDrawer.module.scss
@@ -0,0 +1,53 @@
+.root {}
+
+.detail_panel {
+ :global .card {
+ padding: 22px 15px;
+ }
+
+ &_header {
+ margin-bottom: 30px;
+ }
+ &_table {
+ :global .bigcapital-datatable {
+
+ .thead,
+ .tbody {
+ .invoice_amount,
+ .amount_due,
+ .payment_amount {
+ text-align: right;
+ }
+ }
+ }
+ }
+
+ &_footer {
+ display: flex;
+
+ :global .total_lines {
+ margin-left: auto;
+ }
+ :global .total_lines_line {
+
+ .amount,
+ .title {
+ width: 180px;
+ }
+
+ .amount {
+ text-align: right;
+ }
+ }
+ }
+
+ .total_line {
+ &_subtotal {
+ border-bottom: 1px solid #000;
+ }
+ &_total {
+ border-bottom: 3px double #000;
+ font-weight: 600;
+ }
+ }
+}
\ No newline at end of file
diff --git a/client/src/containers/Drawers/PaymentReceiveDetailDrawer/index.js b/client/src/containers/Drawers/PaymentReceiveDetailDrawer/index.js
index 8bb926f75..109e20e38 100644
--- a/client/src/containers/Drawers/PaymentReceiveDetailDrawer/index.js
+++ b/client/src/containers/Drawers/PaymentReceiveDetailDrawer/index.js
@@ -22,13 +22,10 @@ function PaymentReceiveDetailDrawer({
isOpen={isOpen}
name={name}
size={'65%'}
- style={{
- minWidth: '700px',
- maxWidth: '900px',
- }}
+ style={{ minWidth: '700px', maxWidth: '900px' }}
>
-
+
);
diff --git a/client/src/containers/Drawers/PaymentReceiveDetailDrawer/utils.js b/client/src/containers/Drawers/PaymentReceiveDetailDrawer/utils.js
index 364b7b4da..ecea1634a 100644
--- a/client/src/containers/Drawers/PaymentReceiveDetailDrawer/utils.js
+++ b/client/src/containers/Drawers/PaymentReceiveDetailDrawer/utils.js
@@ -2,34 +2,45 @@ import React from 'react';
import intl from 'react-intl-universal';
import moment from 'moment';
+/**
+ * Retrieve payment entries table columns.
+ */
export const usePaymentReceiveEntriesColumns = () =>
- React.useMemo(() => [
- {
- Header: intl.get('date'),
- accessor: (row) => moment(row.payment_date).format('YYYY MMM DD'),
- width: 100,
- disableSortBy: true,
- },
- {
- Header: intl.get('invoice_no'),
- accessor: 'invoice.invoice_no',
- width: 150,
- disableSortBy: true,
- },
- {
- Header: intl.get('invoice_amount'),
- accessor: 'invoice.balance',
- },
- {
- Header: intl.get('amount_due'),
- accessor: 'invoice.amount_due',
- width: 100,
- disableSortBy: true,
- },
- {
- Header: intl.get('payment_amount'),
- accessor: 'invoice.payment_amount',
- width: 100,
- disableSortBy: true,
- },
- ]);
+ React.useMemo(
+ () => [
+ {
+ Header: intl.get('date'),
+ accessor: (row) => moment(row.payment_date).format('YYYY MMM DD'),
+ width: 100,
+ className: 'date',
+ disableSortBy: true,
+ },
+ {
+ Header: intl.get('invoice_no'),
+ accessor: 'invoice.invoice_no',
+ width: 150,
+ className: 'invoice_number',
+ disableSortBy: true,
+ },
+ {
+ Header: intl.get('invoice_amount'),
+ accessor: 'invoice.balance',
+ className: 'invoice_amount',
+ },
+ {
+ Header: intl.get('amount_due'),
+ accessor: 'invoice.amount_due',
+ className: 'amount_due',
+ width: 100,
+ disableSortBy: true,
+ },
+ {
+ Header: intl.get('payment_amount'),
+ accessor: 'invoice.payment_amount',
+ className: 'payment_amount',
+ width: 100,
+ disableSortBy: true,
+ },
+ ],
+ [],
+ );
diff --git a/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetailHeader.js b/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetailHeader.js
index 2d3ab8fda..6d2ca5c73 100644
--- a/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetailHeader.js
+++ b/client/src/containers/Drawers/ReceiptDetailDrawer/ReceiptDetailHeader.js
@@ -22,7 +22,7 @@ export default function ReceiptDetailHeader() {
{receipt.formatted_amount}
({
+ id: payment.id,
text: payment.vendor.display_name,
subText: payment.formatted_payment_date,
label: payment.formatted_amount,
diff --git a/client/src/containers/Sales/PaymentReceives/PaymentReceiveUniversalSearch.js b/client/src/containers/Sales/PaymentReceives/PaymentReceiveUniversalSearch.js
index c710972bb..bff1faa22 100644
--- a/client/src/containers/Sales/PaymentReceives/PaymentReceiveUniversalSearch.js
+++ b/client/src/containers/Sales/PaymentReceives/PaymentReceiveUniversalSearch.js
@@ -19,7 +19,7 @@ function PaymentReceiveUniversalSearchSelectComponent({
openDrawer,
}) {
if (resourceType === RESOURCES_TYPES.PAYMENT_RECEIVE) {
- openDrawer('payment-receive-drawer', { paymentReceiveId: resourceId });
+ openDrawer('payment-receive-detail-drawer', { paymentReceiveId: resourceId });
}
return null;
}
@@ -58,10 +58,9 @@ export function PaymentReceiveUniversalSearchItem(
/**
* Transformes payment receives to search.
- * @param {*} payment
- * @returns
*/
const paymentReceivesToSearch = (payment) => ({
+ id: payment.id,
text: payment.customer.display_name,
subText: payment.formatted_payment_date,
label: payment.formatted_amount,
diff --git a/client/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js b/client/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js
index 81ec2d599..8d36ff8c5 100644
--- a/client/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js
+++ b/client/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiveActionsBar.js
@@ -61,8 +61,6 @@ function PaymentReceiveActionsBar({
refresh();
};
- console.log(fields, 'fields');
-
return (
diff --git a/client/src/lang/en/index.json b/client/src/lang/en/index.json
index fe587f536..cee6f8be1 100644
--- a/client/src/lang/en/index.json
+++ b/client/src/lang/en/index.json
@@ -1212,5 +1212,10 @@
"edit_contact":"Edit {name}",
"item.sell_description": "Sell description",
"item.purchase_description": "Purchase description",
- "closed_date":"Closed date"
+ "closed_date":"Closed date",
+ "payment_made.details.payment_number": "Payment #",
+ "payment_receive.details.payment_number": "Payment #",
+ "estimate.details.estimate_number": "Estimate #",
+ "receipt.details.receipt_number": "Receipt #",
+ "bill.details.bill_number": "Bill #"
}
\ No newline at end of file
diff --git a/client/src/style/components/Drawers/InvoiceDrawer.module.scss b/client/src/style/components/Drawers/InvoiceDrawer.module.scss
index 1612136b2..770744e1c 100644
--- a/client/src/style/components/Drawers/InvoiceDrawer.module.scss
+++ b/client/src/style/components/Drawers/InvoiceDrawer.module.scss
@@ -1,4 +1,3 @@
-.invoice_details {}
.detail_panel {
:global .card {