PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.16
Yatra – Travel Booking & Tour Operator Software v3.0.16
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
← All changes | app/Services/ItineraryPdfBuilder.php +11 -4 3.0.10 → 3.0.16 View file →
@@ -121,8 +121,9 @@
121 121
122 122 $templateData = [
123 123 'company_name' => SettingsService::get('company_name', get_bloginfo('name')),
124 124 'company_address' => SettingsService::get('company_address', ''),
125 + 'company_address_lines' => \Yatra\Helpers\FormatHelper::companyAddressLines(),
125 126 'company_email' => SettingsService::get('company_email', get_option('admin_email')),
126 127 'company_phone' => SettingsService::get('company_phone', ''),
127 128 'customer_name' => $customerName,
128 129 'customer_email' => (string) ($source['contact_email'] ?? $source['customer_email'] ?? ''),
@@ -133,9 +134,15 @@
133 134 'trip_title' => $trip ? ((string) ($trip->title ?? $tripFallbackTitle)) : $tripFallbackTitle,
134 135 'trip_description'=> $trip ? (string) ($trip->description ?? $trip->content ?? '') : '',
135 136 // Duration is duration_days/duration_nights (no `duration` column).
136 137 'trip_duration' => $trip
137 - ? yatra_format_duration((int) ($trip->duration_days ?? 0), isset($trip->duration_nights) ? (int) $trip->duration_nights : null)
138 + ? yatra_format_duration(
139 + (int) ($trip->duration_days ?? 0),
140 + isset($trip->duration_nights) ? (int) $trip->duration_nights : null,
141 + // Hour-based day tours: "8 hours" instead of "1 day". Absent
142 + // or NULL on every day-based trip, which keeps its wording.
143 + (int) ($trip->duration_hours ?? 0)
144 + )
138 145 : '',
139 146 'trip_difficulty' => $trip ? (string) ($trip->difficulty_name ?? '') : '',
140 147 'trip_highlights' => $trip ? ($trip->highlights ?? $trip->trip_highlights ?? '') : '',
141 148 'trip_includes' => $trip ? ($trip->includes ?? $trip->trip_includes ?? '') : '',
@@ -144,11 +151,11 @@
144 151 'destination' => $trip ? (string) ($trip->destination ?? '') : (string) ($source['destination'] ?? ''),
145 152 'travel_date' => $travelDate,
146 153 'return_date' => $returnDate,
147 154 'currency_symbol' => FormatHelper::getCurrencySymbol($currency),
148 - 'total_amount' => number_format((float) ($source['total_amount'] ?? 0), 2),
149 - 'amount_paid' => number_format((float) ($source['amount_paid'] ?? 0), 2),
150 - 'amount_due' => number_format((float) ($source['amount_due'] ?? 0), 2),
155 + 'total_amount' => yatra_format_price((float) ($source['total_amount'] ?? 0), $currency, false),
156 + 'amount_paid' => yatra_format_price((float) ($source['amount_paid'] ?? 0), $currency, false),
157 + 'amount_due' => yatra_format_price((float) ($source['amount_due'] ?? 0), $currency, false),
151 158 'traveler_count' => (int) ($source['travelers_count'] ?? $source['traveler_count'] ?? $source['travelers'] ?? 1),
152 159 'itinerary_days' => $itineraryDays,
153 160 // Real trip-specific Important Information fields, same
154 161 // ones the single-trip page surfaces in its "Important