@autobusal/routes-order 1.38.0 → 1.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Step5/Billing/Billing.tsx +18 -0
- package/package.json +1 -1
- package/services.ts +6 -1
|
@@ -180,6 +180,24 @@ const Billing = ({ errors, t, refs, only }: Props): JSX.Element => {
|
|
|
180
180
|
</div>
|
|
181
181
|
) }
|
|
182
182
|
|
|
183
|
+
{ /* Claude - 2026-09-25 (Ferjolt): a PRIVATE buyer's identification for
|
|
184
|
+
the fiscal invoice - a company is identified by its VAT number
|
|
185
|
+
below, a person by a personal ID number; without one the first
|
|
186
|
+
passenger's passport stands in, so it stays optional. */ }
|
|
187
|
+
{ asked('bill_company') && !company && (
|
|
188
|
+
<div className="row">
|
|
189
|
+
<label htmlFor={ id('bill_id_number') }>{ t('routes_order.step5.billing.id_number') }</label>
|
|
190
|
+
|
|
191
|
+
<input type="text" id={ id('bill_id_number') } { ...refs('bill_id_number', Validate('max_length:50', t)) } />
|
|
192
|
+
|
|
193
|
+
<NoticeEmail>
|
|
194
|
+
<AiOutlineInfoCircle /> { t('routes_order.step5.billing.id_number_info') }
|
|
195
|
+
</NoticeEmail>
|
|
196
|
+
|
|
197
|
+
{ Display(errors.bill_id_number) }
|
|
198
|
+
</div>
|
|
199
|
+
) }
|
|
200
|
+
|
|
183
201
|
{ asked('bill_company') && company && (
|
|
184
202
|
<div className="column">
|
|
185
203
|
<div className="row">
|
package/package.json
CHANGED
package/services.ts
CHANGED
|
@@ -241,7 +241,12 @@ export const usePostOrder = (
|
|
|
241
241
|
|
|
242
242
|
if (data !== undefined) {
|
|
243
243
|
Object.keys(data).forEach(index => {
|
|
244
|
-
|
|
244
|
+
const value = data[index as keyof typeof data];
|
|
245
|
+
|
|
246
|
+
// an optional billing field the buyer left out is not sent at all
|
|
247
|
+
if (value !== undefined) {
|
|
248
|
+
order[index] = value;
|
|
249
|
+
}
|
|
245
250
|
});
|
|
246
251
|
}
|
|
247
252
|
|