Feature: Shipping Carrier Additions, Creating a voucher without an order, verifying order details before creating voucher, ELTA Courier voucher print updates
This commit is contained in:
@@ -57,6 +57,8 @@ class ShipmentResource extends Resource
|
||||
* done: on a manifest for carriers that batch (ACS), printed for
|
||||
* carriers that issue the voucher on print (ELTA — every parcel of a
|
||||
* multi-parcel send is printed together, so they leave together).
|
||||
* Includes vouchers created without an order (Carrier Vouchers' "Create
|
||||
* voucher"); carrier-reported ones never show here.
|
||||
*/
|
||||
public static function getEloquentQuery(): Builder
|
||||
{
|
||||
@@ -67,7 +69,6 @@ class ShipmentResource extends Resource
|
||||
|
||||
return parent::getEloquentQuery()
|
||||
->where('source', Shipment::SOURCE_CREATED)
|
||||
->whereNotNull('order_id')
|
||||
->whereNull('manifest_id')
|
||||
->whereNull('cancelled_at')
|
||||
->where(fn (Builder $query) => $query
|
||||
@@ -88,7 +89,10 @@ class ShipmentResource extends Resource
|
||||
->placeholder('Not issued yet')
|
||||
->description(fn (Shipment $record) => $record->parcelDescription())
|
||||
->copyable(),
|
||||
TextColumn::make('order.reference')->label('Order'),
|
||||
TextColumn::make('order.reference')
|
||||
->label('Order')
|
||||
->placeholder('No order')
|
||||
->description(fn (Shipment $record) => $record->order_id ? null : $record->recipient()?->name),
|
||||
TextColumn::make('created_at')->label('Created')->dateTime(),
|
||||
TextColumn::make('label_printed_at')->label('Printed')->dateTime()->placeholder('Not printed'),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user