<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="SQL" module="Products.ZSQLMethods.SQL"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_arg</string> </key>
            <value>
              <object>
                <klass>
                  <global name="Args" module="Shared.DC.ZRDB.Aqueduct"/>
                </klass>
                <tuple/>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>_data</string> </key>
                        <value>
                          <dictionary>
                            <item>
                                <key> <string>getDestinationPaymentUid</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>getDestinationSectionUid</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>getDestinationUid</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>getSimulationState</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>getStartDate</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>isFullInventory</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>isInventory</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                            <item>
                                <key> <string>uid</string> </key>
                                <value>
                                  <dictionary/>
                                </value>
                            </item>
                          </dictionary>
                        </value>
                    </item>
                    <item>
                        <key> <string>_keys</string> </key>
                        <value>
                          <list>
                            <string>isInventory</string>
                            <string>uid</string>
                            <string>getDestinationUid</string>
                            <string>getDestinationSectionUid</string>
                            <string>getDestinationPaymentUid</string>
                            <string>getStartDate</string>
                            <string>isFullInventory</string>
                            <string>getSimulationState</string>
                          </list>
                        </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>arguments_src</string> </key>
            <value> <string>isInventory\r\n
uid\r\n
getDestinationUid\r\n
getDestinationSectionUid\r\n
getDestinationPaymentUid\r\n
getStartDate\r\n
isFullInventory\r\n
getSimulationState</string> </value>
        </item>
        <item>
            <key> <string>connection_id</string> </key>
            <value> <string>erp5_sql_connection</string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>z_catalog_inventory_list</string> </value>
        </item>
        <item>
            <key> <string>src</string> </key>
            <value> <string encoding="cdata"><![CDATA[

<dtml-let row_list="[]">\n
\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
  <dtml-if expr="isInventory[loop_item]">\n
    <dtml-if expr="getStartDate[loop_item] is not None">\n
      <dtml-call expr="row_list.append((\n
         uid[loop_item],\n
         getDestinationUid[loop_item],\n
         getDestinationSectionUid[loop_item],\n
         getDestinationPaymentUid[loop_item],\n
         getStartDate[loop_item],\n
         isFullInventory[loop_item],\n
         getSimulationState[loop_item]))">\n
    </dtml-if>\n
  </dtml-if>\n
</dtml-in>\n
\n
<dtml-if expr="len(row_list)">\n
REPLACE INTO\n
  inventory\n
  (`uid`, `node_uid`, `section_uid`, `payment_uid`, `date`, `is_full_inventory`, `simulation_state`)\n
VALUES\n
<dtml-in prefix="row" expr="row_list">\n
  (<dtml-sqlvar expr="row_item[0]" type="int">,\n
   <dtml-sqlvar expr="row_item[1]" type="int" optional>,\n
   <dtml-sqlvar expr="row_item[2]" type="int" optional>,\n
   <dtml-sqlvar expr="row_item[3]" type="int" optional>,\n
   <dtml-sqlvar expr="row_item[4]" type="datetime">,\n
   <dtml-sqlvar expr="row_item[5] or 0" type="int">,\n
   <dtml-sqlvar expr="row_item[6]" type="string">\n
  )<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>

]]></string> </value>
        </item>
        <item>
            <key> <string>template</string> </key>
            <value>
              <object>
                <klass>
                  <global name="__newobj__" module="copy_reg"/>
                </klass>
                <tuple>
                  <global name="SQL" module="Shared.DC.ZRDB.DA"/>
                </tuple>
                <state>
                  <dictionary>
                    <item>
                        <key> <string>__name__</string> </key>
                        <value> <string encoding="cdata"><![CDATA[

<string>

]]></string> </value>
                    </item>
                    <item>
                        <key> <string>_vars</string> </key>
                        <value>
                          <dictionary/>
                        </value>
                    </item>
                    <item>
                        <key> <string>globals</string> </key>
                        <value>
                          <dictionary/>
                        </value>
                    </item>
                    <item>
                        <key> <string>raw</string> </key>
                        <value> <string encoding="cdata"><![CDATA[

<dtml-let row_list="[]">\n
\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
  <dtml-if expr="isInventory[loop_item]">\n
    <dtml-if expr="getStartDate[loop_item] is not None">\n
      <dtml-call expr="row_list.append((\n
         uid[loop_item],\n
         getDestinationUid[loop_item],\n
         getDestinationSectionUid[loop_item],\n
         getDestinationPaymentUid[loop_item],\n
         getStartDate[loop_item],\n
         isFullInventory[loop_item],\n
         getSimulationState[loop_item]))">\n
    </dtml-if>\n
  </dtml-if>\n
</dtml-in>\n
\n
<dtml-if expr="len(row_list)">\n
REPLACE INTO\n
  inventory\n
  (`uid`, `node_uid`, `section_uid`, `payment_uid`, `date`, `is_full_inventory`, `simulation_state`)\n
VALUES\n
<dtml-in prefix="row" expr="row_list">\n
  (<dtml-sqlvar expr="row_item[0]" type="int">,\n
   <dtml-sqlvar expr="row_item[1]" type="int" optional>,\n
   <dtml-sqlvar expr="row_item[2]" type="int" optional>,\n
   <dtml-sqlvar expr="row_item[3]" type="int" optional>,\n
   <dtml-sqlvar expr="row_item[4]" type="datetime">,\n
   <dtml-sqlvar expr="row_item[5] or 0" type="int">,\n
   <dtml-sqlvar expr="row_item[6]" type="string">\n
  )<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>

]]></string> </value>
                    </item>
                  </dictionary>
                </state>
              </object>
            </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
