fix(money,orders): wage/gram-debt parity, atomic document confirm, expert edit, made-to-order, QA fixes
- Rial wage and gram-debt arithmetic matched to the reference; order corrections keep debt in sync - Document confirm/un-confirm is a compare-and-swap (no double-applied cache under concurrency) - Settlement document and expert inputs validated (400 instead of 500) - Expert: edit / activate-deactivate own customers, adjust raw weights only - Made-to-order flow in the app, PreOrder.quantity migration - Order grids: customer column, sort keys; panel select search; pre-order quantity save - Rebuilt release artifacts Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
959a272227
commit
6514b05d18
@@ -204,6 +204,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { optionText } from '../../utils/select';
|
||||
import { computed, onMounted, reactive, ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { message } from 'ant-design-vue';
|
||||
@@ -382,7 +383,7 @@ async function editGram() {
|
||||
}
|
||||
|
||||
function filterOption(input: string, option: any) {
|
||||
return String(option?.children?.[0]?.children ?? '')
|
||||
return optionText(option)
|
||||
.toLowerCase()
|
||||
.includes(input.toLowerCase());
|
||||
}
|
||||
@@ -399,16 +400,15 @@ async function submitOrder() {
|
||||
if (!validate()) return;
|
||||
try {
|
||||
loading.value = true;
|
||||
const order_items = items.value.map((x) => {
|
||||
const v = getVariant(x);
|
||||
return {
|
||||
vid: x.vid,
|
||||
qty: x.qty,
|
||||
percent: v.percentage_pay,
|
||||
promotion_id: x.promotion_id,
|
||||
rial_input: lineRial(x),
|
||||
};
|
||||
});
|
||||
// No `percent`: the server prices each line at what the app would charge
|
||||
// this customer (their percent + the variant's − the largest promotion),
|
||||
// so the same order costs the same from here as from the app.
|
||||
const order_items = items.value.map((x) => ({
|
||||
vid: x.vid,
|
||||
qty: x.qty,
|
||||
promotion_id: x.promotion_id,
|
||||
rial_input: lineRial(x),
|
||||
}));
|
||||
|
||||
// Legacy also sent browser-computed total_price / total_weight /
|
||||
// gold_price_original. The server recomputes those from the variant
|
||||
|
||||
Reference in New Issue
Block a user