From 50c6806c3a456f8542df9486cb0e4c7e4d8fe103 Mon Sep 17 00:00:00 2001 From: hosseintaromi Date: Sat, 27 Dec 2025 22:48:36 +0330 Subject: [PATCH] fix --- Pricing All Services.txt | 1303 +++++++++++++++++ src/components/ui/VariantManager.tsx | 32 +- src/pages/payment-card/core/_hooks.ts | 1 + src/pages/payment-card/core/_models.ts | 1 + src/pages/payment-card/core/_requests.ts | 1 + src/pages/payment-ipg/core/_hooks.ts | 1 + src/pages/payment-ipg/core/_models.ts | 1 + src/pages/payment-ipg/core/_requests.ts | 1 + .../payment-ipg/ipg-list/IPGListPage.tsx | 1 + src/pages/products/core/_models.ts | 4 + .../product-detail/ProductDetailPage.tsx | 6 + .../products/product-form/ProductFormPage.tsx | 3 + src/pages/wallet/core/_hooks.ts | 1 + src/pages/wallet/core/_models.ts | 1 + src/pages/wallet/core/_requests.ts | 1 + .../wallet/wallet-list/WalletListPage.tsx | 1 + 16 files changed, 1358 insertions(+), 1 deletion(-) create mode 100644 Pricing All Services.txt diff --git a/Pricing All Services.txt b/Pricing All Services.txt new file mode 100644 index 0000000..0024dff --- /dev/null +++ b/Pricing All Services.txt @@ -0,0 +1,1303 @@ +Pre-Purchase +Pre-Purchase Inspection Pricing +Base Inspection +Building-only inspection +* Up to 2 combined bedrooms & bathrooms + +* One level (apartments are considered one level) + +Price: $400 +Additional Charges + + +Item + Price + Each additional bedroom + $50 + Each additional bathroom + $50 + Each additional level + $100 + Basement + $150 + Granny flat + $350 + + + + +Optional Add-Ons + + +Add-On + Price + Pest inspection + $150 + Drug residue testing + $150 + Thermal imaging & moisture meter + $150 + Roof inspection using drone + $250 + 1–2 minute walk-through video + $50 + Same-day inspection (subject to availability) + $180 + Saturday inspection (subject to availability) + $150 + Sunday inspection (subject to availability) + $300 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Booking questions (skipping the questions we ask on quote ) + + + 1. Contact person 1 (first name / lastname / email /mobile) + 2. Contact person 2 (first name / lastname / email /mobile) + 3. Property address (Including Lot number) + 4. Agent details (first name / lastname / email /mobile) + 5. ATTACH engineer drawing (if available) + 6. ATTACH floor plans (if available) + 7. ATTACH roof truss layout (if available) + 8. Control joint layout (if available) + 9. ATTACH proof of payment + 10. Who will provide access? (Agent / vendor / tenant) + 11. Tentative Time + 12. Any comment or special needs +Pre-Sales +Pre-Sales Inspection Pricing +Base Inspection +Building-only inspection + * Up to 2 combined bedrooms & bathrooms + + * One level (apartments are considered one level) + +Price: $400 +Additional Charges + + +Item + Price + Each additional bedroom + $50 + Each additional bathroom + $50 + Each additional level + $100 + Basement + $150 + Granny flat + $350 + + + + +Optional Add-Ons + + +Add-On + Price + Pest inspection + $150 + Drug residue testing + $150 + Thermal imaging & moisture meter + $150 + Roof inspection using drone + $250 + 1–2 minute walk-through video + $50 + Same-day inspection (subject to availability) + $180 + Saturday inspection (subject to availability) + $150 + Sunday inspection (subject to availability) + $300 + + +Apartment Pre-Settlement +Apartment Pre-settlement Inspection Pricing +Base Inspection +Building-only inspection + * Up to 2 combined bedrooms & bathrooms + + * One level (apartments are considered one level) + +Price: $400 +Additional Charges + + +Item + Price + Each additional bedroom + $50 + Each additional bathroom + $50 + + + + +Optional Add-Ons + + +Add-On + Price + Pest inspection + $150 + Thermal imaging & moisture meter + $150 + Roof inspection using drone + $250 + 1–2 minute walk-through video + $50 + Same-day inspection (subject to availability) + $180 + Saturday inspection (subject to availability) + $150 + Sunday inspection (subject to availability) + $300 + + + + + + + + +https://forms.monday.com/forms/06952a0406c7c96d7eff4d15f8019a66?r=use1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Booking questions + + + 1. Contact person 1 (first name / lastname / email /mobile) + 2. Contact person 2 (first name / lastname / email /mobile) + 3. Property address (Including Lot number) + 4. Agent details (first name / lastname / email /mobile) + 5. ATTACH engineer drawing (if available) + 6. ATTACH floor plans (if available) + 7. ATTACH roof truss layout (if available) + 8. Control joint layout (if available) + 9. ATTACH proof of payment + 10. Who will provide access? (Agent / vendor / tenant) + 11. Tentative Time + 12. Any comment or special needs +Pre-Handover inspection +Pre-Handover Inspection +pre hand over if apartment > apartment pre settlement +if house > construction PCI + + + + + + +https://forms.monday.com/forms/d5ea6163a6459424c4b62c00b57e7b24?r=use1 + + + + +important note +The rate sheet engine calculates a base price, but we add pricing based on location, property value and area value https://docs.google.com/spreadsheets/d/14LKewVfaGeIrhE4wCqESCOS89xSONS3z32JVWwfVL0s/edit?gid=0#gid=0 + We have given each property a mark from 1 to 10 And for each mark we add some %% to the price Ratesheet engine should use this sheet or we add it to dashboard We need to talk to Hossein Nazari about it +Dilapidation +Pre-Purchase Inspection Pricing +Base Inspection +Building-only inspection + * Up to 2 combined bedrooms & bathrooms + + * One level (apartments are considered one level) + +Price: $400 + + +Item + Price + Each additional bedroom + $50 + Each additional bathroom + $50 + Each additional level + $100 + Basement + $150 + Granny flat + $350 + Swimming pool + $100 + + +Optional Add-Ons (Per Property) + + +Add-On + Price + Owner Inspections arranging access to neighbouring properties + $50 + Roof inspection using drone + $250 + 1–2 minute walk-through video + $50 + Same-day inspection (subject to availability) + $180 + Saturday inspection (subject to availability) + $150 + Sunday inspection (subject to availability) + $300 + + + + + + + + + + +https://forms.monday.com/forms/0989e5030dc2bb690877d39a28dd2b85?r=use1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Booking questions (skipping the questions we ask on quote ) + + + 1. Client 2 name (if available) + 2. Client 2 last name (if available) + 3. Client 2 mobile number (if available) + 4. Client 2 email (if available) + 5. Property 1 address (Including Lot number) + 6. State + 7. How many storeys? + 8. Number of bedrooms and bathrooms + 9. Building size Inc. Garage (sq) + 10. Property 2(Neighbour) address (Including Lot number) (if Requested) + 11. How many storeys? + 12. Building size Inc. Garage (sq) + 13. Number of bedrooms and bathrooms + 14. Choose your package discount + 15. If they request OI to arrange everything with the neighbours: + 16. Neighbour Name + 17. Neighbour Number + 18. Neighbour Email + 19. What type of construction or works are taking place? +☐ Excavation +☐ Demolition +☐ New Building/Extension +☐ Roadworks / Infrastructure +☐ Other + 20. Where are the works located in relation to the property? +☐ Adjoining property +☐ Same property (before works start) +☐ Council/utility works nearby +☐ Other + 21. What is the report required for? +☐ Baseline record before construction starts +☐ Post-construction comparison +☐ Council/authority requirement +☐ Dispute resolution +☐ Other + 22. 23. ATTACH engineer drawing (if available) + 24. ATTACH floor plans (if available) + 25. ATTACH roof truss layout (if available) + 26. Control joint layout (if available) + 27. Any comment or special needs: + 28. Column for accepting the quote + 29. ATTACH proof of payment + 30. Tentative Time +drug resistance +Pre-Purchase Inspection Pricing +Base Inspection +Building-only inspection + * Up to 2 combined bedrooms & bathrooms + +Price: $400 +Additional Charges + + +Item + Price + Each additional bedroom + $50 + + + + + + + + +New Construction stages +New Construction Stages Inspection Pricing +Base Property Type +Single-storey dwelling + * Up to 25 squares + + * Prices below are per inspection stage +Inspection Stages & Pricing + + +Inspection Stage + Price + Bored Piers / Screw Piles + $490 + Slab Pre-Pour + $490 + Frame Inspection + $490 + Lock-Up (Pre-Plaster) + $490 + Fixing (including Waterproofing) + $490 + Completion (PCI / Pre-Handover) + $590 + Maintenance Stage + $590 + + +Additional Charges (Per Stage) + + + + +Condition + Additional Cost + Each additional level + * $50 + Every extra 0–5 squares + * $50 + Properties larger than 70 squares + Custom quote required + Granny flat + * $300 + + +Optional Add-Ons + + + + +Add-On + Price + Availability + Thermal imaging & moisture meter + $150 + PCI stage only + Roof inspection using drone + $250 + PCI stage only + 2–3 minute walk-through video + $50 + Any stage + Same-day inspection + $180 + Subject to availability + Saturday inspection + $150 + Subject to availability + Sunday inspection + $300 + Subject to availability + + +Offers: N/A +All stages with full payment in advanced: + * 150 $ off + * $50 reinspection credit per stage +Free 1-2 min video on per stage +FREE Thermal Camera at PCI +50 % off Drone at PCI +All stages with $500 deposit (credited to final inspection) + * - FREE 1-minute video each stage +Online booking within 1 hour: $50 off + + +Refund policy: +Non Refundable + + + + + + + + + + +https://forms.monday.com/forms/f36ab6c89a7db39ced2c71c8739fb047?r=use1 + + + + + + + + +Booking questions (skipping the questions we ask on quote ) + + + 1. Client 2 name (if available) + 2. Client 2 last name (if available) + 3. Client 2 mobile number (if available) + 4. Client 2 email (if available) + 5. Property address (Including Lot number) + 6. State + 7. How many storeys? + 8. Building size Inc. Garage (sq) + 9. Stage Inspection: + * Bored Piers (If Applicable) + * Slab Pre-Pour + * Fixing (and Waterproofing) + * Frame + * Lock-up (Before Plaster) + * Completion (PCI) + * Maintenance + 10. Choose your package discount + 11. Site Supervisor name (If known) + 12. Site Supervisor Number + 13. Site Supervisor Email + 14. Builder admin name + 15. Builder admin number + 16. Builder admin email + 17. ATTACH engineer drawing (if available) + 18. ATTACH floor plans (if available) + 19. ATTACH roof truss layout (if available) + 20. Control joint layout (if available) + 21. Construction tentatively commences within: + 22. Any comment or special needs: + 23. Column for accepting the quote + 24. ATTACH proof of payment +maintenance +New Construction Stages Inspection Pricing +Base Property Type +Single-storey dwelling + * Up to 25 squares + +Price: $590 +Additional Charges (Per Stage) + + + + +Condition + Additional Cost + Each additional level + * $50 + Every extra 0–5 squares + * $50 + Properties larger than 70 squares + Custom quote required + Granny flat + * $300 + + +Optional Add-Ons + + + + +Add-On + Price + Availability + Thermal imaging & moisture meter + $150 + PCI stage only + Roof inspection using drone + $250 + PCI stage only + 2–3 minute walk-through video + $50 + Any stage + Same-day inspection + $180 + Subject to availability + Saturday inspection + $150 + Subject to availability + Sunday inspection + $300 + Subject to availability + + +Offers: N/A +All stages with full payment in advanced: + * 150 $ off + * $50 reinspection credit per stage +Free 1-2 min video on per stage +FREE Thermal Camera at PCI +50 % off Drone at PCI +All stages with $500 deposit (credited to final inspection) + * - FREE 1-minute video each stage +Online booking within 1 hour: $50 off + + +Refund policy: +Non Refundable + + + + + + + + + + +https://forms.monday.com/forms/f36ab6c89a7db39ced2c71c8739fb047?r=use1 + + + + + + + + +Booking questions (skipping the questions we ask on quote ) + + + 1. Client 2 name (if available) + 2. Client 2 last name (if available) + 3. Client 2 mobile number (if available) + 4. Client 2 email (if available) + 5. Property address (Including Lot number) + 6. State + 7. How many storeys? + 8. Building size Inc. Garage (sq) + 9. Stage Inspection: + * Bored Piers (If Applicable) + * Slab Pre-Pour + * Fixing (and Waterproofing) + * Frame + * Lock-up (Before Plaster) + * Completion (PCI) + * Maintenance + 10. Choose your package discount + 11. Site Supervisor name (If known) + 12. Site Supervisor Number + 13. Site Supervisor Email + 14. Builder admin name + 15. Builder admin number + 16. Builder admin email + 17. ATTACH engineer drawing (if available) + 18. ATTACH floor plans (if available) + 19. ATTACH roof truss layout (if available) + 20. Control joint layout (if available) + 21. Construction tentatively commences within: + 22. Any comment or special needs: + 23. Column for accepting the quote + 24. ATTACH proof of payment + + +Insurance Report +InsuranceInspection Pricing + + + + +Stage + Item + Price + + + 1 + Document review & site inspection + $1,500 + Fixed price + 2 + Detailed report preparation + $1,500 + + $1,000 Each additional $100,000 of loss + 3 + Cost estimate preparation + $1,500 + + $1,000 Each additional $100,000 of loss + + + + +Optional Add-Ons + + +Add-On + Price + Thermal imaging & moisture meter + $150 + Roof inspection using drone + $250 + Same-day inspection + $180 (subject to availability) + Saturday inspection + $150 (subject to availability) + Sunday inspection + $300 (subject to availability) + + + + + + + + + + + + + + + + + + + + + + + + + + + + +https://forms.monday.com/forms/cbe78bb1c2735c19f63f4a92f203b933?r=use1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Booking questions (skipping the questions we ask on quote ) + + + 1. Property Address + 2. Is it house/apartment/ townhouse/ commercial + 3. Policy holder/tenant/builder/insurance company representative + 4. Approx. age of property + 5. Is the property occupied or vacant + 6. Name of insurance company + 7. Claim number (if available) + 8. Type of insurance claim: + * Storm + * Hail + * flood/water damage + * Fire + * Structural defect + * subsidence/movement + + + 9. Has the claim already been lodged? + 10. Has the insurer already sent an assessor/builder? + 11. Are there specific issues the insurer has asked to be investigated? + 12. Main Issue + 13. Areas of damage (roof/ceiling/walls/floors/windows or doors/external areas/others) + 14. Photos/videos (if available) + 15. Has any other professional (builder/plumber/engineer/assessor) provided a report? + 16. If yes, provide copies +Defects Investigation Report +Defect Investigation Inspection Pricing + + + + +Stage + Item + Price + 1 + Document review & site inspection + $1,500 + 2 + Detailed report preparation + $1,500 + + + + +Optional Add-Ons + + +Add-On + Price + Thermal imaging & moisture meter + $150 + Roof inspection using drone + $250 + Same-day inspection + $180 (subject to availability) + Saturday inspection + $150 (subject to availability) + Sunday inspection + $300 (subject to availability) + + + + + + +Defect investigation has 2 stages +If only stage umber is added in request payload add it to the quote_price + + + + + + + + + + + + + +https://forms.monday.com/forms/045ab4c86451914e6aac905e91b5e489?r=use1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Booking questions (skipping the questions we ask on quote ) + + + 1. Property owner / tenant / builder / strata or body corporate / solicitor + 2. Property Address + 3. Is it house / apartment / townhouse / commercial + 4. Approx. age of the property + 5. Is the property occupied or vacant + 6. Brief declaration of main issue + 7. Affected Areas (roof / ceiling / walls / floors / windows or doors / external areas / plumbing / electrical / others) + 8. Photos / videos (if available) + 9. The Problem/concern (cracking, leaks, movement, water ingress, uneven floors) +Expert Witness Report +Expert Witness Inspection Pricing + + + + +Stage + Item + Price + + + 1 + Document review & site inspection + $2450 + up to 7 hours + 2 + Detailed report preparation + $350 + For each extra hours (min 7 hours) + 3 + Cost estimate preparation (scott schedule) + $350 + For each extra hours (min 7 hours) + + + + +Optional Add-Ons + + +Add-On + Price + Thermal imaging & moisture meter + $150 + Roof inspection using drone + $250 + Same-day inspection + $180 (subject to availability) + Saturday inspection + $150 (subject to availability) + Sunday inspection + $300 (subject to availability) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Booking questions (skipping the questions we ask on quote ) + + + 1. Property Address + 2. Is it house/apartment/ townhouse/ commercial + 3. Property owner/tenant/builder/solicitor + 4. Are you currently represented by a solicitor? + 5. If yes: + * Solicitor name + * Solicitor number + * Solicitor email address + 6. Age of the property + 7. Is the property occupied or vacant + 8. The Main issue (brief description) + 9. Who is the dispute with? (builder, contractor, developer, strata, insurer) + 10. Is this matter currently in: + * NCAT/VCAT/QCAT/Other Tribunal + * Court + * Mediation/Pre-trial + * Not yet lodged + 11. Is there a deadline for submission of the report + 12. Has anyone previously inspected or reported on this matter? + 13. If yes: provide details + * Builder report + * Engineer’s report + * Insurer’s assessment + + + 14. What do you require from the Expert Witness Report? + * Independent expert opinion on defects + * Assessment of builder’s workmanship against standards + * Cost-to-rectify estimate + * Response to another party’s report + * Other + 15. Photos/videos (if available) + 16. Report purpose: + * Builder/contractor dispute + * Insurance/strata claim + * Legal purposes +Condition report + + +Renovation / Alteration + + +strata building bond + + +137B + + +brain storming +Future inspections +Rental Property Condition Report (Entry / Exit) +condition report +addin pre sales inspection +what is building inspection +handover inspecton +asbestos report +mintnance report +home renovation +https://www.consumer.vic.gov.au/housing/buying-and-selling-property/buying-property/inspect-properties-before-you-buy +what do u think of https://inspectioncentral.com.au/ + 1. submit the quote (i need consultant before buying) + 2. needs quote + • 3. pays online + + +User Flow + + +Service & Sales Model +1. Service Classification +A. By Sales Method + * Type X – Instant Price (Self-Serve) + * Price is calculated automatically + * Customer can accept quote and pay online + * Type Y – Sales-Assisted + * Requires consultation (phone or online meeting) + * Price may be discussed or negotiated with sales + * No instant payment before consultation +________________ + + +B. By Staging + * Non-Staged Services + * Single delivery + * Staged Services + * Multiple stages (e.g. construction stages) + * Customer may: + * Buy one stage + * Buy multiple stages at once + * Buy one stage now and return later for additional stages +Each stage must be independently quotable, invoiceable, and payable. +________________ + + +End-to-End Customer & System Flow +________________ + + +STEP 1 — Lead Capture & Quote Creation +Customer Flow +Customer fills the form and submits: +Form Fields + * First name + * Last name + * Email + * Phone + * Property address + * Service type +Customer is redirected to a Thank You page. +________________ + + +Backend Automation (Triggered on Submit) + 1. Property Intelligence + * Call OpenAI API to extract: + * Property type + * Bedrooms / bathrooms / levels + * Special attributes (basement, granny flat, pool, etc.) + 2. Pricing + * Send structured property + service data to Rate Sheet Engine + * Calculate base price + addons + stages (if applicable) + 3. CRM Objects Created + * Contact (customer) + * Property + * Job (primary container) + * Quote (linked to job) + 4. Associations + * Contact ↔ Property ↔ Job ↔ Quote +________________ + + +Customer Communication Logic +If Service = Type X (Instant Price) + * Email sent: + * Quote summary + * “View Quote” button + * “Accept Quote & Pay” CTA +If Service = Type Y (Sales-Assisted) + * Email sent: + * Thank-you message + * One or more Calendly booking links + * No payment CTA at this stage +________________ + + +Website Access Logic + * Customer can: + * Open quote via email or + * View quote on website + * Phone verification is mandatory before showing quote details +________________ + + +STEP 1.1 — Sales Intervention (Optional) +Used for Type Y or renegotiated Type X services. +Sales Capabilities + * Modify quote price + * Add / remove addons + * Add or remove stages + * Generate Quote Revision (q1, q2, …) + * Email updated quote to customer +Only the latest active quote can be accepted. +________________ + + +STEP 2 — Quote Acceptance → Invoice Creation +Customer Action + * Clicks “Accept Quote & Pay Now” +System Actions + 1. Lock the accepted quote (read-only) + 2. Generate an Invoice: + * Same structure as quote + * Unique invoice number + * Linked to job & quote + 3. Show invoice to customer + 4. Display “Pay Now” button +________________ + + +STEP 3 — Payment Processing (Stripe) +Payment Flow + 1. Customer clicks Pay Now + 2. Redirect to Stripe Checkout + 3. Stripe returns payment status via webhook +________________ + + +Payment Handling Logic + * Record payment in system: + * Amount + * Method + * Stripe payment ID + * Detect payment type: + * Full payment + * Partial payment + * Update invoice status: + * Paid + * Partially Paid +________________ + + +Customer View + * Payment receipt displayed + * Payment history visible in dashboard +________________ + + +STEP 4 — Booking After Payment +Customer Action + * From receipt page: + * Click “Book Now” + * Redirected to booking form/page +________________ + + +Booking Form Collects + * Preferred inspection date/time + * Access details + * Additional contacts + * Notes / special instructions +________________ + + +System Actions + 1. Attach booking data to job + 2. Set job status → Booked + 3. Show confirmation message: +“Your booking is received and pending confirmation.” +________________ + + +Internal Sales / Ops Action + * Review booking + * Confirm availability + * Update job status → Booking Confirmed + * Send booking confirmation email to customer +________________ + + +Job & Financial Status Model (Recommended) +Job Status + * New Lead + * Quoted + * Quote Revised + * Quote Accepted + * Invoiced + * Paid / Partially Paid + * Booked + * Booking Confirmed + * Completed +________________ + + +Quote Status + * Draft + * Sent + * Revised + * Accepted + * Expired +________________ + + +Invoice Status + * Draft + * Issued + * Partially Paid + * Paid +________________ + + +Key Design Principles (Why This Works) + * Single Job is the source of truth + * Quotes and invoices are versioned, not overwritten + * Supports: + * Staged services + * Partial payments + * Sales renegotiation + * Returning customers buying more stages later + * Same flow for frontend & email + * Clean separation between Quote → Invoice → Payment → Booking \ No newline at end of file diff --git a/src/components/ui/VariantManager.tsx b/src/components/ui/VariantManager.tsx index 6c78765..ffd11a0 100644 --- a/src/components/ui/VariantManager.tsx +++ b/src/components/ui/VariantManager.tsx @@ -76,6 +76,7 @@ const VariantForm: React.FC = ({ variant, onSave, onCancel, is enabled: true, fee_percentage: 0, profit_percentage: 0, + tax_percentage: 0, stock_limit: 0, stock_managed: true, stock_number: 0, @@ -99,6 +100,7 @@ const VariantForm: React.FC = ({ variant, onSave, onCancel, is const [weightDisplay, setWeightDisplay] = useState(variant?.weight?.toString() || ''); const [feePercentageDisplay, setFeePercentageDisplay] = useState(variant?.fee_percentage?.toString() || ''); const [profitPercentageDisplay, setProfitPercentageDisplay] = useState(variant?.profit_percentage?.toString() || ''); + const [taxPercentageDisplay, setTaxPercentageDisplay] = useState(variant?.tax_percentage?.toString() || ''); const { mutateAsync: uploadFile } = useFileUpload(); const { mutate: deleteFile } = useFileDelete(); @@ -119,11 +121,14 @@ const VariantForm: React.FC = ({ variant, onSave, onCancel, is if (variant?.profit_percentage !== undefined) { setProfitPercentageDisplay(variant.profit_percentage.toString()); } + if (variant?.tax_percentage !== undefined) { + setTaxPercentageDisplay(variant.tax_percentage.toString()); + } // Load variant attribute value if exists if (variantAttributeName && variant?.attributes && variant.attributes[variantAttributeName]) { setVariantAttributeValue(variant.attributes[variantAttributeName].toString()); } - }, [variant?.weight, variant?.fee_percentage, variant?.profit_percentage, variant?.attributes, variantAttributeName]); + }, [variant?.weight, variant?.fee_percentage, variant?.profit_percentage, variant?.tax_percentage, variant?.attributes, variantAttributeName]); const handleInputChange = (field: keyof ProductVariantFormData, value: any) => { if (typeof value === 'string') { @@ -261,6 +266,28 @@ const VariantForm: React.FC = ({ variant, onSave, onCancel, is /> +
+ + { + const converted = persianToEnglish(e.target.value); + setTaxPercentageDisplay(converted); + }} + onBlur={(e) => { + const converted = persianToEnglish(e.target.value); + const numValue = parseFloat(converted) || 0; + handleInputChange('tax_percentage', numValue); + }} + className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-1 focus:ring-primary-500 dark:bg-gray-700 dark:text-gray-100" + placeholder="مثال: ۹" + /> +
+
+
+ درصد مالیات + + {formatNumber(variant.tax_percentage || 0)}% + +
وزن diff --git a/src/pages/products/product-form/ProductFormPage.tsx b/src/pages/products/product-form/ProductFormPage.tsx index 8d296b7..04c9d20 100644 --- a/src/pages/products/product-form/ProductFormPage.tsx +++ b/src/pages/products/product-form/ProductFormPage.tsx @@ -178,6 +178,7 @@ const ProductFormPage = () => { enabled: variant.enabled, fee_percentage: variant.fee_percentage, profit_percentage: variant.profit_percentage, + tax_percentage: variant.tax_percentage || 0, stock_limit: variant.stock_limit, stock_managed: variant.stock_managed, stock_number: variant.stock_number, @@ -351,6 +352,7 @@ const ProductFormPage = () => { enabled: variant.enabled, fee_percentage: variant.fee_percentage, profit_percentage: variant.profit_percentage, + tax_percentage: variant.tax_percentage || 0, stock_limit: variant.stock_limit, stock_managed: variant.stock_managed, stock_number: variant.stock_number, @@ -380,6 +382,7 @@ const ProductFormPage = () => { enabled: variant.enabled, fee_percentage: variant.fee_percentage, profit_percentage: variant.profit_percentage, + tax_percentage: variant.tax_percentage || 0, stock_limit: variant.stock_limit, stock_managed: variant.stock_managed, stock_number: variant.stock_number, diff --git a/src/pages/wallet/core/_hooks.ts b/src/pages/wallet/core/_hooks.ts index 37670dd..9a23fcb 100644 --- a/src/pages/wallet/core/_hooks.ts +++ b/src/pages/wallet/core/_hooks.ts @@ -32,3 +32,4 @@ export const useUpdateWalletStatus = () => { + diff --git a/src/pages/wallet/core/_models.ts b/src/pages/wallet/core/_models.ts index 5dca97e..bae6c54 100644 --- a/src/pages/wallet/core/_models.ts +++ b/src/pages/wallet/core/_models.ts @@ -28,3 +28,4 @@ export const WALLET_LABELS: Record = { + diff --git a/src/pages/wallet/core/_requests.ts b/src/pages/wallet/core/_requests.ts index 81892ad..3f9fcd1 100644 --- a/src/pages/wallet/core/_requests.ts +++ b/src/pages/wallet/core/_requests.ts @@ -23,3 +23,4 @@ export const updateWalletStatus = async ( + diff --git a/src/pages/wallet/wallet-list/WalletListPage.tsx b/src/pages/wallet/wallet-list/WalletListPage.tsx index faef2df..53a870b 100644 --- a/src/pages/wallet/wallet-list/WalletListPage.tsx +++ b/src/pages/wallet/wallet-list/WalletListPage.tsx @@ -151,3 +151,4 @@ export default WalletListPage; +