<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params>isDelivery
uid
getSourceUid
getDestinationUid
getSourceSectionUid
getDestinationSectionUid
getResourceUid
getStartDate
getStopDate
insert_line</params>
<dtml-if insert_line>
INSERT INTO delivery(uid) VALUES (<dtml-sqlvar uid type="int">);

<dtml-var "'\0'">

</dtml-if>
<dtml-if isDelivery>
UPDATE delivery SET
  uid=<dtml-sqlvar uid type="int">,
  source_uid=<dtml-sqlvar getSourceUid type="int" optional>,
  destination_uid=<dtml-sqlvar getDestinationUid type="int" optional>,
  source_section_uid=<dtml-sqlvar getSourceSectionUid type="int" optional>,
  destination_section_uid=<dtml-sqlvar getDestinationSectionUid type="int" optional>,
  resource_uid=<dtml-sqlvar getResourceUid type="int" optional>,
  start_date=<dtml-sqlvar getStartDate type="datetime" optional>,
  stop_date=<dtml-sqlvar getStopDate type="datetime" optional>
WHERE <dtml-sqltest uid op=eq type=int>
</dtml-if>
