Log 2375

$paymentDate = ”;
$contractSigningDate = ”;
$daysToPayment = ”;

// Set values for placeholders
// #מועד התשלום:# placeholder value: “במעמד החוזה”
$paymentPlaceholderValue = ‘במעמד החוזה’;
// #תאריך חתימת החוזה# placeholder value: “10/12/2022”
$contractSigningDateValue = ’10/12/2022′;
// #תאריך לתשלום:# placeholder value: “בחר תאריך”
$choosePaymentDateValue = ‘בחר תאריך’;
// #מספר ימים לתשלום:# placeholder value: 5
$daysToPaymentValue = 5;

if ($paymentPlaceholderValue === $choosePaymentDateValue) {
// If payment date is set to #תאריך לתשלום:#, use contract signing date
$paymentDate = $contractSigningDate;
} elseif ($paymentPlaceholderValue === ‘ימים מהחוזה’) {
// If payment date is set to “ימים מהחוזה”, calculate the date by adding days to contract signing date
$contractSigningTimestamp = strtotime($contractSigningDate);
$additionalDaysTimestamps = $daysToPayment * 24 * 60 * 60; // Convert days to seconds
$paymentTimestamp = $contractSigningTimestamp + (int)$additionalDaysTimestamps;
$paymentDate = date(‘d/m/Y’, $paymentTimestamp);
} else {
// Otherwise, use the contract signing date as payment date
$paymentDate = $contractSigningDate;
}

return $paymentDate;

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
  • Attributes
  • Custom attributes
  • Custom fields
Click outside to hide the comparison bar
Compare