mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat( financial statment) :sales & purchases by items & inventory query.
This commit is contained in:
@@ -27,7 +27,7 @@ import { saveInvoke, compose } from 'utils';
|
||||
*/
|
||||
function APAgingSummaryActionsBar({
|
||||
// #withPayableAgingSummary
|
||||
payableAgingFilter,
|
||||
isFilterDrawerOpen,
|
||||
|
||||
// #withARAgingSummaryActions
|
||||
toggleAPAgingSummaryFilterDrawer: toggleFilterDrawerDisplay,
|
||||
@@ -66,14 +66,14 @@ function APAgingSummaryActionsBar({
|
||||
className={classNames(Classes.MINIMAL, 'button--table-views')}
|
||||
icon={<Icon icon="cog-16" iconSize={16} />}
|
||||
text={
|
||||
payableAgingFilter ? (
|
||||
isFilterDrawerOpen ? (
|
||||
<T id={'hide_customizer'} />
|
||||
) : (
|
||||
<T id={'customize_report'} />
|
||||
)
|
||||
}
|
||||
onClick={handleFilterToggleClick}
|
||||
active={payableAgingFilter}
|
||||
active={isFilterDrawerOpen}
|
||||
/>
|
||||
<NavbarDivider />
|
||||
<Popover
|
||||
|
||||
@@ -308,3 +308,53 @@ export const APAgingSummaryTableRowsMapper = (sheet, total) => {
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
export const inventoryValuationReducer = (sheet) => {
|
||||
const results = [];
|
||||
|
||||
if (sheet.items) {
|
||||
sheet.items.forEach((item) => {
|
||||
results.push(item);
|
||||
});
|
||||
}
|
||||
if (sheet.total) {
|
||||
results.push({
|
||||
rowType: 'total',
|
||||
...sheet.total,
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
export const purchasesByItemsReducer = (sheet) => {
|
||||
const results = [];
|
||||
|
||||
if (sheet.items) {
|
||||
sheet.items.forEach((item) => {
|
||||
results.push(item);
|
||||
});
|
||||
}
|
||||
if (sheet.total) {
|
||||
results.push({
|
||||
rowType: 'total',
|
||||
...sheet.total,
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
export const salesByItemsReducer = (sheet) => {
|
||||
const results = [];
|
||||
|
||||
if (sheet.items) {
|
||||
sheet.items.forEach((item) => {
|
||||
results.push(item);
|
||||
});
|
||||
}
|
||||
if (sheet.total) {
|
||||
results.push({
|
||||
rowType: 'total',
|
||||
...sheet.total,
|
||||
});
|
||||
}
|
||||
return results;
|
||||
};
|
||||
Reference in New Issue
Block a user